3692 lines
226 KiB
Plaintext
3692 lines
226 KiB
Plaintext
@{
|
||
ViewBag.Title = "Home Page";
|
||
}
|
||
<img id="photo" src="@Url.Content("~/ligerUI/skins/icons/add.gif")" /><br />
|
||
<input id="getphoto" type="button" onclick="getpersonphoto()" value="拍照" />
|
||
|
||
<div id="from1"></div>
|
||
@section scripts{
|
||
<script type="text/javascript">
|
||
var diag;
|
||
function getpersonphoto()
|
||
{
|
||
diag= $.ligerDialog.open({url:"@Url.Action("FlashCapture", "Common")",width:715,height:295,title:"拍照"});
|
||
}
|
||
function shuipho(data)
|
||
{
|
||
$("#photo").attr("src", data);
|
||
diag.close();
|
||
}
|
||
$("#from1").ligerForm({
|
||
inputWidth: 170, labelWidth: 90, space: 40,
|
||
fields: [
|
||
{
|
||
display: "类别 ", name: "CategoryID", newline: true, type: "select", options: {
|
||
url: "@Url.Action("GetCheckTypeMaintain", "Dictionaries")",parms:{belong:"职业"},
|
||
valueField: "id",
|
||
textField: "check_type"
|
||
|
||
}
|
||
}]});
|
||
</script>
|
||
<script type="text/javascript">
|
||
//显示/隐藏查询条件栏
|
||
function showHide(theHiddenMess) {
|
||
var view = document.getElementById(theHiddenMess);
|
||
if (searchbox2.style.display == "none"){
|
||
searchbox2.style.display ="";
|
||
searchbox3.style.display ="";
|
||
searchbox4.style.display ="";
|
||
searchbox5.style.display ="";
|
||
//searchbox6.style.display ="";
|
||
searchbox7.style.display ="";
|
||
showhide.className="up";
|
||
link = document.getElementById("testid");
|
||
link.style.height = "100px";
|
||
}else {
|
||
searchbox2.style.display ="none";
|
||
searchbox3.style.display ="none";
|
||
searchbox4.style.display ="none";
|
||
searchbox5.style.display ="none";
|
||
//searchbox6.style.display ="none";
|
||
searchbox7.style.display ="none";
|
||
showhide.className="down";
|
||
link = document.getElementById("testid");
|
||
link.style.height = "230px";
|
||
}
|
||
}
|
||
|
||
|
||
|
||
//改变待(已)检人员列表底色
|
||
function setColor(obj){
|
||
if(obj.checked){
|
||
document.getElementById("cd").style.background = '#D1E9E9';
|
||
}else{
|
||
document.getElementById("cd").style.background = 'white';
|
||
}
|
||
}
|
||
|
||
|
||
//改变结果参考列表底色
|
||
function setBgColorsss(index){
|
||
var colorTdId = document.getElementById("nameidsss").value;
|
||
document.getElementById("nameClicksss"+index).style.background="#D1E9E9";
|
||
document.getElementById("nameidsss").value="nameClicksss"+index;
|
||
|
||
//相同下标时
|
||
if(colorTdId=="nameClicksss"+index){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClicksss"+index && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
//点击体检项目列表,load对应的“结果参考”、“历史记录”;
|
||
function setBgColorss(index,projectId){
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(projectId);
|
||
var colorTdId = document.getElementById("nameidss").value;
|
||
document.getElementById("nameClickss"+projectId).style.background="#D1E9E9";
|
||
document.getElementById("nameidss").value="nameClickss"+projectId;
|
||
|
||
//相同下标时
|
||
if(colorTdId=="nameClickss"+projectId){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClickss"+projectId && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
|
||
//删除所有参考结果信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
var projectResultVal = document.getElementById("projectResult"+projectId).innerHTML;
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':projectId},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+projectId+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[0][3]+'</td>'+
|
||
'</tr>');
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+projectId+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':index,'projectId':projectId},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//点击体检项目列表,load对应的“历史记录”(用于已提交人员,防止被修改信息);
|
||
function setBgColorssOfCommited(index,projectId){
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(projectId);
|
||
var colorTdId = document.getElementById("nameidss").value;
|
||
document.getElementById("nameClickss"+projectId).style.background="#D1E9E9";
|
||
document.getElementById("nameidss").value="nameClickss"+projectId;
|
||
|
||
//相同下标时
|
||
if(colorTdId=="nameClickss"+projectId){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClickss"+projectId && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':index,'projectId':projectId},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
|
||
|
||
//点击“保存”按钮,保存选定用户的信息,但不提交。
|
||
function savePersonInfo(){
|
||
document.getElementById("button2").style.backgroundColor="#BFCA68";
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
if($("#currentPersonId").val() != ''){
|
||
var pArray = $("#projectIdArray").val();
|
||
if(pArray == ''){
|
||
return;
|
||
}
|
||
|
||
//使用二维数组装载检查项目数据
|
||
var pArrays = ($("#projectIdArray").val().split(","));
|
||
var reulstList=new Array();
|
||
for(var i=0;i<pArrays.length-1;i++){
|
||
reulstList[i]=new Array();
|
||
for(var j=0;j<5;j++){
|
||
if(j==0){
|
||
if($("#projectResult"+pArrays[i]).val() == ''){
|
||
reulstList[i][0] = 'emptyResult';
|
||
}else{
|
||
reulstList[i][0] = $("#projectResult"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==1){
|
||
if($("#isLoss"+pArrays[i]).is(":checked")){
|
||
reulstList[i][1] = 'loss';
|
||
}
|
||
}
|
||
if(j==2){
|
||
if($("#isQualified"+pArrays[i]).is(":checked")){
|
||
reulstList[i][2] = 'qualified';
|
||
}
|
||
}
|
||
if(j==3){
|
||
if($("#remark"+pArrays[i]).val() == ''){
|
||
reulstList[i][3] = 'emptyResult';
|
||
}else{
|
||
reulstList[i][3] = $("#remark"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==4){
|
||
reulstList[i][4] = '@';
|
||
}
|
||
}
|
||
}
|
||
|
||
setInterval(threadWait, 500);
|
||
$.get("professionalExamResultsEntry.do?method=saveProjectResultWhenClickSave&reulstList="+encodeURI(encodeURI(reulstList)),{'personId':$("#currentPersonId").val(),'pArray':pArray},function(data,status){});
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
//点击待(已)检人员列表,load对应的“人员基本信息”、“体检项目”、“结果参考”、“历史记录”,"体检流程";当切换人员时,判断检查结果栏是否有结果,若有则自动保存该结果,并记录填写人及填写时间
|
||
function setBgColors(index,groupId){
|
||
//改变“待(已)检人员列表”底色
|
||
var colorTdId = document.getElementById("nameids").value;
|
||
document.getElementById("nameClicks"+index).style.background="#D1E9E9";
|
||
document.getElementById("nameids").value="nameClicks"+index;
|
||
if(colorTdId=="nameClicks"+index){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClicks"+index && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
|
||
//点击列表load人员信息前保存现有数据
|
||
savePersonInfo();
|
||
setInterval(threadWait, 500);
|
||
|
||
$("#currentPersonId").val(index);
|
||
//改变“待(已)检人员列表”底色
|
||
|
||
//给“人员基本信息”赋值
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':index},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
//给“人员基本信息”赋值
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有参考结果信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':index},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':index},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+index+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+index+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':index,'projectId':personProjectList[j][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+index+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+index+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
})
|
||
|
||
}
|
||
|
||
|
||
function popUpBox(id ,name , val){
|
||
if(name!='龋齿'){
|
||
return;
|
||
}
|
||
//保存结果框的id用于最后存储结果
|
||
document.getElementById("tearId").value=id;
|
||
cc = new Array;
|
||
//点击修改是需要将选中的内容着色
|
||
if(val!=null&& val!=""){
|
||
cc = val.split(";");
|
||
for(var i=0;i<cc.length; i++){
|
||
var titl =cc[i].substring(0,1);
|
||
if(titl=='D'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/D:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //恒牙A区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("0").value="D";
|
||
document.getElementById("0").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("1").value="D";
|
||
document.getElementById("1").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("2").value="D";
|
||
document.getElementById("2").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("3").value="D";
|
||
document.getElementById("3").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("4").value="D";
|
||
document.getElementById("4").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("5").value="D";
|
||
document.getElementById("5").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("6").value="D";
|
||
document.getElementById("6").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("7").value="D";
|
||
document.getElementById("7").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("8").value="D";
|
||
document.getElementById("8").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("9").value="D";
|
||
document.getElementById("9").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("10").value="D";
|
||
document.getElementById("10").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("11").value="D";
|
||
document.getElementById("11").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("12").value="D";
|
||
document.getElementById("12").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("13").value="D";
|
||
document.getElementById("13").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("14").value="D";
|
||
document.getElementById("14").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("15").value="D";
|
||
document.getElementById("15").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("16").value="D";
|
||
document.getElementById("16").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("17").value="D";
|
||
document.getElementById("17").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("18").value="D";
|
||
document.getElementById("18").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("19").value="D";
|
||
document.getElementById("19").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("20").value="D";
|
||
document.getElementById("20").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("21").value="D";
|
||
document.getElementById("21").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("22").value="D";
|
||
document.getElementById("22").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("23").value="D";
|
||
document.getElementById("23").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("24").value="D";
|
||
document.getElementById("24").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("25").value="D";
|
||
document.getElementById("25").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("26").value="D";
|
||
document.getElementById("26").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("27").value="D";
|
||
document.getElementById("27").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("28").value="D";
|
||
document.getElementById("28").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("29").value="D";
|
||
document.getElementById("29").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("30").value="D";
|
||
document.getElementById("30").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("31").value="D";
|
||
document.getElementById("31").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(titl=='M'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/M:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //恒牙A区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("0").value="M";
|
||
document.getElementById("0").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("1").value="M";
|
||
document.getElementById("1").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("2").value="M";
|
||
document.getElementById("2").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("3").value="M";
|
||
document.getElementById("3").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("4").value="M";
|
||
document.getElementById("4").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("5").value="M";
|
||
document.getElementById("5").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("6").value="M";
|
||
document.getElementById("6").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("7").value="M";
|
||
document.getElementById("7").style.backgroundColor="#FF0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("8").value="M";
|
||
document.getElementById("8").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("9").value="M";
|
||
document.getElementById("9").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("10").value="M";
|
||
document.getElementById("10").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("11").value="M";
|
||
document.getElementById("11").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("12").value="M";
|
||
document.getElementById("12").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("13").value="M";
|
||
document.getElementById("13").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("14").value="M";
|
||
document.getElementById("14").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("15").value="M";
|
||
document.getElementById("15").style.backgroundColor="#FF0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("16").value="M";
|
||
document.getElementById("16").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("17").value="M";
|
||
document.getElementById("17").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("18").value="M";
|
||
document.getElementById("18").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("19").value="M";
|
||
document.getElementById("19").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("20").value="M";
|
||
document.getElementById("20").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("21").value="M";
|
||
document.getElementById("21").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("22").value="M";
|
||
document.getElementById("22").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("23").value="M";
|
||
document.getElementById("23").style.backgroundColor="#FF0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("24").value="M";
|
||
document.getElementById("24").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("25").value="M";
|
||
document.getElementById("25").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("26").value="M";
|
||
document.getElementById("26").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("27").value="M";
|
||
document.getElementById("27").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("28").value="M";
|
||
document.getElementById("28").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("29").value="M";
|
||
document.getElementById("29").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("30").value="M";
|
||
document.getElementById("30").style.backgroundColor="#FF0008";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("31").value="M";
|
||
document.getElementById("31").style.backgroundColor="#FF0008";
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(titl=='F'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/F:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //恒牙A区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("0").value="F";
|
||
document.getElementById("0").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("1").value="F";
|
||
document.getElementById("1").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("2").value="F";
|
||
document.getElementById("2").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("3").value="F";
|
||
document.getElementById("3").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("4").value="F";
|
||
document.getElementById("4").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("5").value="F";
|
||
document.getElementById("5").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("6").value="F";
|
||
document.getElementById("6").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("7").value="F";
|
||
document.getElementById("7").style.backgroundColor="#B06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("8").value="F";
|
||
document.getElementById("8").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("9").value="F";
|
||
document.getElementById("9").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("10").value="F";
|
||
document.getElementById("10").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("11").value="F";
|
||
document.getElementById("11").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("12").value="F";
|
||
document.getElementById("12").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("13").value="F";
|
||
document.getElementById("13").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("14").value="F";
|
||
document.getElementById("14").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("15").value="F";
|
||
document.getElementById("15").style.backgroundColor="#B06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==8:
|
||
document.getElementById("16").value="F";
|
||
document.getElementById("16").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("17").value="F";
|
||
document.getElementById("17").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("18").value="F";
|
||
document.getElementById("18").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("19").value="F";
|
||
document.getElementById("19").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("20").value="F";
|
||
document.getElementById("20").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("21").value="F";
|
||
document.getElementById("21").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("22").value="F";
|
||
document.getElementById("22").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("23").value="F";
|
||
document.getElementById("23").style.backgroundColor="#B06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("24").value="F";
|
||
document.getElementById("24").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("25").value="F";
|
||
document.getElementById("25").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("26").value="F";
|
||
document.getElementById("26").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("27").value="F";
|
||
document.getElementById("27").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("28").value="F";
|
||
document.getElementById("28").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==6:
|
||
document.getElementById("29").value="F";
|
||
document.getElementById("29").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==7:
|
||
document.getElementById("30").value="F";
|
||
document.getElementById("30").style.backgroundColor="#B06350";
|
||
break;
|
||
case val[0]==8:
|
||
document.getElementById("31").value="F";
|
||
document.getElementById("31").style.backgroundColor="#B06350";
|
||
break;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
/* ------------- 乳牙 ----------*/
|
||
if(titl=='d'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/d:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //乳牙 A区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("32").value="D";
|
||
document.getElementById("32").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("33").value="D";
|
||
document.getElementById("33").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("34").value="D";
|
||
document.getElementById("34").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("35").value="D";
|
||
document.getElementById("35").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("36").value="D";
|
||
document.getElementById("36").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("37").value="D";
|
||
document.getElementById("37").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("38").value="D";
|
||
document.getElementById("38").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("39").value="D";
|
||
document.getElementById("39").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("40").value="D";
|
||
document.getElementById("40").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("41").value="D";
|
||
document.getElementById("41").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("42").value="D";
|
||
document.getElementById("42").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("43").value="D";
|
||
document.getElementById("43").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("44").value="D";
|
||
document.getElementById("44").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("45").value="D";
|
||
document.getElementById("45").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("46").value="D";
|
||
document.getElementById("46").style.backgroundColor="#01FD01";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("47").value="D";
|
||
document.getElementById("47").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("48").value="D";
|
||
document.getElementById("48").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("49").value="D";
|
||
document.getElementById("49").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("50").value="D";
|
||
document.getElementById("50").style.backgroundColor="#01FD01";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("51").value="D";
|
||
document.getElementById("51").style.backgroundColor="#01FD01";
|
||
break;
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(titl=='m'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/m:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //恒牙A区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("32").value="M";
|
||
document.getElementById("32").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("33").value="M";
|
||
document.getElementById("33").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("34").value="M";
|
||
document.getElementById("34").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("35").value="M";
|
||
document.getElementById("35").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("36").value="M";
|
||
document.getElementById("36").style.backgroundColor="#ff0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("37").value="M";
|
||
document.getElementById("37").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("38").value="M";
|
||
document.getElementById("38").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("39").value="M";
|
||
document.getElementById("39").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("40").value="M";
|
||
document.getElementById("40").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("41").value="M";
|
||
document.getElementById("41").style.backgroundColor="#ff0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("42").value="M";
|
||
document.getElementById("42").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("43").value="M";
|
||
document.getElementById("43").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("44").value="M";
|
||
document.getElementById("44").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("45").value="M";
|
||
document.getElementById("45").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("46").value="M";
|
||
document.getElementById("46").style.backgroundColor="#ff0008";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("47").value="M";
|
||
document.getElementById("47").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("48").value="M";
|
||
document.getElementById("48").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("49").value="M";
|
||
document.getElementById("49").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("50").value="M";
|
||
document.getElementById("50").style.backgroundColor="#ff0008";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("51").value="M";
|
||
document.getElementById("51").style.backgroundColor="#ff0008";
|
||
break;
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if(titl=='f'){
|
||
sp = new Array;
|
||
var rp = cc[i].replace(/f:/,"");
|
||
sp = rp.split(",");
|
||
for(var j=0; j<sp.length;j++){
|
||
var val = sp[j];
|
||
if(val[1]=='A'){ //恒牙A区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("32").value="F";
|
||
document.getElementById("32").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("33").value="F";
|
||
document.getElementById("33").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("34").value="F";
|
||
document.getElementById("34").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("35").value="F";
|
||
document.getElementById("35").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("36").value="F";
|
||
document.getElementById("36").style.backgroundColor="#b06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='B'){//恒牙B区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("37").value="F";
|
||
document.getElementById("37").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("38").value="F";
|
||
document.getElementById("38").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("39").value="F";
|
||
document.getElementById("39").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("40").value="F";
|
||
document.getElementById("40").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("41").value="F";
|
||
document.getElementById("41").style.backgroundColor="#b06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='C'){//恒牙C区
|
||
switch(true){
|
||
case val[0]==5:
|
||
document.getElementById("42").value="F";
|
||
document.getElementById("42").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("43").value="F";
|
||
document.getElementById("43").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("44").value="F";
|
||
document.getElementById("44").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("45").value="F";
|
||
document.getElementById("45").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==1:
|
||
document.getElementById("46").value="F";
|
||
document.getElementById("46").style.backgroundColor="#b06350";
|
||
break;
|
||
}
|
||
}
|
||
if(val[1]=='D'){//恒牙D区
|
||
switch(true){
|
||
case val[0]==1:
|
||
document.getElementById("47").value="F";
|
||
document.getElementById("47").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==2:
|
||
document.getElementById("48").value="F";
|
||
document.getElementById("48").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==3:
|
||
document.getElementById("49").value="F";
|
||
document.getElementById("49").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==4:
|
||
document.getElementById("50").value="F";
|
||
document.getElementById("50").style.backgroundColor="#b06350";
|
||
break;
|
||
case val[0]==5:
|
||
document.getElementById("51").value="F";
|
||
document.getElementById("51").style.backgroundColor="#b06350";
|
||
break;
|
||
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
$('#w').window('open');
|
||
|
||
}
|
||
|
||
//点击人员列表时,给人员列表着色
|
||
function setBgColorsOfCommited(index,groupId){
|
||
|
||
//改变“待(已)检人员列表”底色
|
||
var colorTdId = document.getElementById("nameids").value;
|
||
document.getElementById("nameClicks"+index).style.background="#D1E9E9";
|
||
document.getElementById("nameids").value="nameClicks"+index;
|
||
if(colorTdId=="nameClicks"+index){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClicks"+index && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
|
||
$("#currentPersonId").val(index);
|
||
|
||
//给“人员基本信息”赋值
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':index},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
|
||
|
||
})
|
||
|
||
//给“人员基本信息”赋值
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':index},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':index},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorssOfCommited(\''+index+'\',\''+personProjectList[0][2]+'\')")" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" disabled value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" disabled value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" /></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" readonly name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':index,'projectId':personProjectList[j][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorssOfCommited(\''+index+'\',\''+personProjectList[j][2]+'\')")" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" disabled id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" disabled checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
})
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
//点击授权项目,load对应的“待(已)检人员列表”、“人员基本信息”、“体检项目”、“结果参考”、“历史记录”;
|
||
function setBgColor(index,groupId,groupName){
|
||
var colorTdId = document.getElementById("nameid").value;
|
||
document.getElementById("nameClick"+index).style.background="#D1E9E9";
|
||
document.getElementById("nameid").value="nameClick"+index;
|
||
if(colorTdId=="nameClick"+index){
|
||
document.getElementById(colorTdId).style.background="#D1E9E9";
|
||
}else if(colorTdId!="nameClick"+index && colorTdId != ''){
|
||
document.getElementById(colorTdId).style.background="#FFFFFF";
|
||
}
|
||
//切换时,取消查询中的已录复选框
|
||
$("#haveEntry").attr("checked", false);
|
||
|
||
//记录当前查询小组,为查询时做准备
|
||
$("#currentGroupId").val(groupId);
|
||
$("#currentGroupName").val(groupName);
|
||
//切换体检小组前,初始化当前项目,及人员
|
||
$("#currentProjectId").val('');
|
||
$("#currentPersonId").val('');
|
||
|
||
//保存数据前,先查看是否存在体检项目,若不存在,则不进行保存操作
|
||
//if($("#projectIdArray").val() == ''){
|
||
// return false;
|
||
//}
|
||
|
||
//点击授权前保存现有数据
|
||
savePersonInfo();
|
||
|
||
setInterval(threadWait, 500);
|
||
|
||
var haveEntry;
|
||
var normal;
|
||
var reCheck;
|
||
var all;
|
||
|
||
if($("#haveEntry").is(":checked")){
|
||
haveEntry = 'haveEntry';
|
||
}
|
||
if($("#normal").is(":checked")){
|
||
normal = 'normal';
|
||
}
|
||
if($("#reCheck").is(":checked")){
|
||
reCheck = 'reCheck';
|
||
}
|
||
if($("#all").is(":checked")){
|
||
all = 'all';
|
||
}
|
||
|
||
var physicalNum = $("#physicalNum").val();
|
||
var qName = $("#qName").val();
|
||
var qGender = $("#qGender").val();
|
||
var qCheckType = $("#qCheckType").val();
|
||
var registryStart = $("#registryStart").val();
|
||
var registryEnd = $("#registryEnd").val();
|
||
var examStart = $("#examStart").val();
|
||
var examEnd = $("#examEnd").val();
|
||
var collectStart = $("#collectStart").val();
|
||
var collectEnd = $("#collectEnd").val();
|
||
|
||
//切换前初始化项目
|
||
$("#projectIdArray").val('');
|
||
|
||
//切换前初始化人员,并且默认取消全选选中状态
|
||
$("#personIdArray").val('');
|
||
$("#checkedAll").attr("checked", false);
|
||
|
||
//删除所有人员信息
|
||
$("#table1 tr:not(:last)").remove();
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有结果参考信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
|
||
//setInterval(threadWait, 500);
|
||
|
||
//执行查询,并生成人员列表。
|
||
$.post("professionalExamResultsEntry.do?method=createPersonListAfterQuery",{'currentGroupId':groupId,'physicalNum':physicalNum,'haveEntry':haveEntry,'normal':normal,'reCheck':reCheck,'qName':qName,'qGender':qGender,'qCheckType':qCheckType,'registryStart':registryStart,'registryEnd':registryEnd,'examStart':examStart,'examEnd':examEnd,'all':all,'collectStart':collectStart,'collectEnd':collectEnd},function(data,status){
|
||
//$.post("professionalExamResultsEntry.do?method=createPersonList",{'groupId':groupId},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personList = Data.personList;
|
||
//给条数赋值
|
||
$("#totalCount").val(personList.length)
|
||
for(var i=0; i<personList.length; i++){
|
||
if(i==0){
|
||
//默认选中第一个人员
|
||
$("#tool").before('<tr align="center" style="background:#D1E9E9" onclick="setBgColors(\''+personList[0][0]+'\',\''+groupId+'\')" id="nameClicks'+personList[0][0]+'" >'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[0][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px"><font color="black">'+personList[0][3]+'</font></td>'+
|
||
'<td width="10%" height="25px"><font color="black">'+personList[0][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameids").val('nameClicks'+personList[0][0]);
|
||
//记录当前人员ID,为切换时保存人员信息做准备
|
||
$("#currentPersonId").val(personList[0][0]);
|
||
//生成完表格后,给“人员基本信息”处赋值;默认选中第一个人员的数据
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px" id="initResult"> '+projectResultList[0][3]+'</td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':personList[0][0],'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.background="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly size="16" style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly size="16" style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
})
|
||
}else{
|
||
$("#tool").before('<tr align="center" id="nameClicks'+personList[i][0]+'" onclick="setBgColors(\''+personList[i][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px" ><input type="checkbox" name="checkbox_name" value="'+personList[i][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[i][3]+'</font></td>'+
|
||
'<td width="10%" height="25px"><font color="black">'+personList[i][4]+'</font></td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
});
|
||
//每次点击授权项目后,都将焦点放置在“体检编号”查询上
|
||
$("#physicalNum").focus();
|
||
|
||
}
|
||
function turnUp(projectId){
|
||
$("#projectResult"+projectId).focus();
|
||
}
|
||
function turnDown(projectId){
|
||
$("#projectResult"+projectId).focus();
|
||
}
|
||
function getTitle(obj){
|
||
obj.title=obj.innerHTML;
|
||
}
|
||
|
||
|
||
//全选、取消全选方法
|
||
$(document).ready(function () {
|
||
$("#checkedAll").click(function () {
|
||
var str=",";
|
||
|
||
if ($(this).attr("checked")) { // 全选
|
||
$("input[name='checkbox_name']").each(function () {
|
||
$(this).attr("checked", true);
|
||
str += $(this).val()+","
|
||
});
|
||
}else { // 取消全选
|
||
$("input[name='checkbox_name']").each(function () {
|
||
$(this).attr("checked", false);
|
||
});
|
||
}
|
||
|
||
$("#personIdArray").val(str);
|
||
|
||
});
|
||
});
|
||
|
||
//双击“结果参考”栏给选中项目赋值,并与参考值比较,判断是否合格,若不合格,则“合格”处取消选中,并设置底色
|
||
|
||
function setResultToProject(id,result,projectId,qualified){
|
||
var isQualified = document.getElementById("isQualified"+projectId).checked;
|
||
if($("#projectResult"+projectId).val() == '' || $("#projectResult"+projectId).val() == '缺项未检'){
|
||
$("#projectResult"+projectId).val('');
|
||
$("#projectResult"+projectId).val(result);
|
||
|
||
}else if($("#projectResult"+projectId).val() != '' && qualified == '是'){
|
||
$("#projectResult"+projectId).val('');
|
||
$("#projectResult"+projectId).val(result);
|
||
|
||
}else if($("#projectResult"+projectId).val() != '' && qualified == '否' && isQualified==false){
|
||
$("#projectResult"+projectId).val($("#projectResult"+projectId).val()+"、"+result);
|
||
}else if($("#projectResult"+projectId).val() != '' && qualified == '否' && isQualified==true){
|
||
$("#projectResult"+projectId).val(result);
|
||
}
|
||
|
||
var standard = $("#standardResult"+projectId).val();
|
||
|
||
var model = $("#judgeModel"+projectId).val();
|
||
if(trim(model) == '定性'){
|
||
if(trim(qualified) == '是' || trim(result) == ''){
|
||
$("#projectResult"+projectId).val('');
|
||
$("#projectResult"+projectId).val(trim(result));
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
|
||
}
|
||
}else{
|
||
var max = standard.split("-")[1]; //最大值
|
||
var mis = standard.split("-")[0]; //最小值
|
||
|
||
//判断前,先判断是否是纯数字,若不是,则直接默认合格
|
||
if(isNaN(obj.value)){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else{
|
||
if((eval(trim(result)) >= eval(trim(mid)) && eval(trim(result)) <= eval(trim(max))) || trim(result) == '缺项未检' || trim(result) == ''){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
//临界值
|
||
if((eval(trim(result)) == eval(trim(mis)) || eval(trim(result)) == eval(trim(max))) ){
|
||
document.getElementById("projectName"+projectId).style.color="#9ACD32";
|
||
}else{
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
//校验字符串是否包含中文
|
||
function isChinese(s){
|
||
var patrn=/[\u4E00-\u9FA5]|[\uFE30-\uFFA0]/gi;
|
||
if(!patrn.exec(s)){
|
||
return false;
|
||
}else{
|
||
return true;
|
||
}
|
||
}
|
||
|
||
|
||
function trim(str){ //删除左右两端的空格
|
||
return str.replace(/(^\s*)|(\s*$)/g, "");
|
||
}
|
||
|
||
function ltrim(str){ //删除左边的空格
|
||
return str.replace(/(^\s*)/g,"");
|
||
}
|
||
|
||
function rtrim(str){ //删除右边的空格
|
||
return str.replace(/(\s*$)/g,"");
|
||
}
|
||
|
||
|
||
|
||
//每当用户修改结果时,都进行判断(方法1:在JS端校验。已过时。参见方法compareStandard())
|
||
function compareStandard1(obj,projectId,qualified){
|
||
|
||
var standard = $("#standardResult"+projectId).val();
|
||
var model = $("#judgeModel"+projectId).val();
|
||
|
||
//只要检查结果为缺项未检,则直接默认为“缺项”,“不合格”
|
||
if(trim(obj.value) == '缺项未检'){
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
$("#isLoss"+projectId).attr("checked", true);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}else{
|
||
if(trim(model) == '定性'){
|
||
if(trim(qualified) == '合格' || trim(obj.value) == ''){
|
||
$("#projectResult"+projectId).val(trim(obj.value));
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else if(trim(qualified) == '' || trim(qualified) == '不合格'){//为空说明手动修改结果
|
||
if(trim(obj.value) == trim(standard)){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}else{
|
||
var max = standard.split("-")[1]; //最大值
|
||
var mis = standard.split("-")[0]; //最小值
|
||
//判断前,先判断是否是纯数字,若不是,则直接默认合格
|
||
if(isNaN(obj.value)){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else{
|
||
if((eval(trim(obj.value)) >= eval(trim(mis)) && eval(trim(obj.value)) <= eval(trim(max))) || trim(obj.value) == '缺项未检' || trim(obj.value) == ''){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
//临界值
|
||
if((eval(trim(obj.value)) == eval(trim(mis)) || eval(trim(obj.value)) == eval(trim(max))) ){
|
||
document.getElementById("projectName"+projectId).style.color="#9ACD32";
|
||
}else{
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//每当用户修改结果时,都进行判断
|
||
function compareStandard(obj,projectId,qualified){
|
||
if(obj.value == ''){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else if(obj.value == '缺项未检'){
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
$("#isLoss"+projectId).attr("checked", true);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}else if(obj.value != ''){
|
||
$.post("professionalExamResultsEntry.do?method=compareStandard",{'inputValue':obj.value,'projectId':projectId,'judgeModel':$("#judgeModel"+projectId).val(),"personId":$("#currentPersonId").val()},function(data,status){
|
||
setInterval(threadWait, 500);
|
||
var Data = eval('('+data+')') ;
|
||
if(Data.action == 'qualified'){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else if(Data.action == 'equals'){ //临界
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="#9ACD32";
|
||
}else if(Data.action == 'error'){
|
||
alert("输入错误,请重新输入!")
|
||
$("#projectResult"+projectId).val("");
|
||
$("#projectResult"+projectId).focus();
|
||
} if(Data.action == 'noPass'){
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
if($("#currentGroupId").val()==22){
|
||
if($("#currentPersonId").val() != ''){
|
||
var pArray = $("#projectIdArray").val();
|
||
if(pArray == ''){
|
||
return;
|
||
}
|
||
|
||
//使用二维数组装载检查项目数据
|
||
var pArrays = ($("#projectIdArray").val().split(","));
|
||
|
||
var reulstList=new Array();
|
||
var resultFlag = 1;
|
||
for(var i=0;i<pArrays.length-1;i++){
|
||
reulstList[i]=new Array();
|
||
for(var j=0;j<5;j++){
|
||
if(j==0){
|
||
if($("#projectResult"+pArrays[i]).val() == ''){
|
||
reulstList[i][0] = 'emptyResult';
|
||
resultFlag = 0;
|
||
}else{
|
||
reulstList[i][0] = $("#projectResult"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==1){
|
||
if($("#isLoss"+pArrays[i]).is(":checked")){
|
||
reulstList[i][1] = 'loss';
|
||
}
|
||
}
|
||
if(j==2){
|
||
if($("#isQualified"+pArrays[i]).is(":checked")){
|
||
reulstList[i][2] = 'qualified';
|
||
}
|
||
}
|
||
if(j==3){
|
||
if($("#remark"+pArrays[i]).val() == ''){
|
||
reulstList[i][3] = 'emptyResult';
|
||
}else{
|
||
reulstList[i][3] = $("#remark"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==4){
|
||
reulstList[i][4] = '@';
|
||
}
|
||
}
|
||
}
|
||
if(resultFlag==1){
|
||
$.get("professionalExamResultsEntry.do?method=saveProjectResultWhenClickSave&reulstList="+encodeURI(encodeURI(reulstList)),{'personId':$("#currentPersonId").val(),'pArray':pArray},function(data,status){
|
||
$("#personValue17").val(eval('('+data+')'));
|
||
|
||
});
|
||
}
|
||
}
|
||
}
|
||
|
||
});
|
||
}
|
||
}
|
||
|
||
function changeResult(projectId){
|
||
if(confirm("确定要覆盖当前结果吗?")){
|
||
$("#projectResult"+projectId).val('缺项未检');
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}
|
||
|
||
|
||
function changeIsQualified(projectId){
|
||
var flag = $("#isQualified"+projectId).attr("checked");
|
||
if(confirm("确定要修改合格标记吗?")){
|
||
if(flag){
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}
|
||
}else{
|
||
if(flag){
|
||
$("#isQualified"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="red";
|
||
}else{
|
||
$("#isQualified"+projectId).attr("checked", true);
|
||
$("#isLoss"+projectId).attr("checked", false);
|
||
document.getElementById("projectName"+projectId).style.color="black";
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
//刷新
|
||
function dorefresh(){
|
||
window.location.reload();
|
||
}
|
||
|
||
|
||
|
||
//点击人员列表复选框
|
||
function checkRecord(obj){
|
||
var personIdArray = $("#personIdArray").val();
|
||
var id;
|
||
if(personIdArray == ''){
|
||
id = ","+trim(obj.value) + ",";
|
||
}else{
|
||
id = trim(obj.value) + ",";
|
||
}
|
||
|
||
if(obj.checked){
|
||
personIdArray = personIdArray + id ;
|
||
}else{
|
||
personIdArray = personIdArray.replace(id,'');
|
||
}
|
||
$("#personIdArray").val(personIdArray);
|
||
}
|
||
|
||
|
||
|
||
//打印人员项目清单
|
||
var win;
|
||
function printPersonProjects(){
|
||
|
||
document.getElementById("button4").style.backgroundColor="#BFCA68";
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
var ids = $("#personIdArray").val();
|
||
var currentGroupId = $("#currentGroupId").val();
|
||
if(currentGroupId == ''){
|
||
alert("请选择授权项目!");
|
||
return;
|
||
}
|
||
if(ids.length <= 1){
|
||
alert("未选中人员");
|
||
return;
|
||
}
|
||
var url = "professionalExamResultsEntry.do?method=printPersonProjects&personIds="+ids+"¤tGroupId="+currentGroupId;
|
||
|
||
|
||
window.open(url, 'newwindow', 'height=1, width=1, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no');
|
||
/* win= new Ext.Window({
|
||
renderTo:Ext.getBody(),
|
||
title:'体检人员项目清单',
|
||
closable:true,
|
||
y:2,
|
||
width:900,
|
||
height:440,
|
||
layout:'fit',
|
||
draggable:false,//不允许拖动
|
||
autoHeigth:true,
|
||
modal:true,//遮罩属性
|
||
html:'<iframe src= '+url+' width=900 , height= 440,top=0, frameborder=0></iframe>'
|
||
});
|
||
win.show(this); */
|
||
|
||
}
|
||
|
||
function closeStandard() {
|
||
win.close();
|
||
}
|
||
|
||
|
||
//查询功能.根据查询条件重新加载“待(已)检人员列表”,“人员基本信息”,“体检项目”,“结果参考”,“历史记录”
|
||
function queryPersonList(type){
|
||
/* //提交上一位的体检信息
|
||
if(type !='re' && $("#physicalNum").val()!='' && ($("#currentGroupName").val()=="X光透视" || $("#currentGroupName").val()=="X光摄片") ){
|
||
AutoCommit();
|
||
}
|
||
*/
|
||
//取消其他图标着色,给当前图标着色#
|
||
document.getElementById("button1").style.backgroundColor="#BFCA68";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
//执行查询时,清空数据
|
||
$("#personValue1").val('');
|
||
$("#personValue2").val('');
|
||
$("#personValue3").val('');
|
||
$("#personValue4").val('');
|
||
$("#personValue5").val('');
|
||
$("#personValue6").val('');
|
||
$("#personValue7").val('');
|
||
$("#personValue8").val('');
|
||
$("#personValue9").val('');
|
||
$("#personValue10").val('');
|
||
$("#personValue11").val('');
|
||
$("#personValue12").val('');
|
||
$("#personValue13").val('');
|
||
$("#personValue14").val('');
|
||
$("#personValue17").val('');
|
||
|
||
|
||
//切换前初始化人员,并且默认取消全选选中状态
|
||
$("#personIdArray").val('');
|
||
$("#checkedAll").attr("checked", false);
|
||
|
||
//var pic = document.getElementById("picture");
|
||
//pic.src = '../images/no_pic.png';
|
||
|
||
//获取当前小组ID
|
||
var groupId = $("#currentGroupId").val();
|
||
if(groupId == ''){
|
||
alert("请选择授权项目!");
|
||
return;
|
||
}
|
||
var haveEntry;
|
||
var normal;
|
||
var reCheck;
|
||
var all;
|
||
|
||
if($("#haveEntry").is(":checked")){
|
||
haveEntry = 'haveEntry';
|
||
}
|
||
if($("#normal").is(":checked")){
|
||
normal = 'normal';
|
||
}
|
||
if($("#reCheck").is(":checked")){
|
||
reCheck = 'reCheck';
|
||
}
|
||
if($("#all").is(":checked")){
|
||
all = 'all';
|
||
}
|
||
|
||
var physicalNum = $("#physicalNum").val();
|
||
var qName = $("#qName").val();
|
||
var qGender = $("#qGender").val();
|
||
var qCheckType = $("#qCheckType").val();
|
||
var registryStart = $("#registryStart").val();
|
||
var registryEnd = $("#registryEnd").val();
|
||
var examStart = $("#examStart").val();
|
||
var examEnd = $("#examEnd").val();
|
||
var collectStart = $("#collectStart").val();
|
||
var collectEnd = $("#collectEnd").val();
|
||
|
||
//删除所有人员信息
|
||
$("#table1 tr:not(:last)").remove();
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有结果参考信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
|
||
setInterval(threadWait, 500);
|
||
//执行查询,并生成人员列表
|
||
$.post("professionalExamResultsEntry.do?method=createPersonListAfterQuery",{'currentGroupId':groupId,'physicalNum':physicalNum,'haveEntry':haveEntry,'normal':normal,'reCheck':reCheck,'qName':qName,'qGender':qGender,'qCheckType':qCheckType,'registryStart':registryStart,'registryEnd':registryEnd,'examStart':examStart,'examEnd':examEnd,'all':all,'collectStart':collectStart,'collectEnd':collectEnd},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personList = Data.personList;
|
||
var isRecheck = Data.isRecheck;
|
||
//给条数赋值
|
||
$("#totalCount").val(personList.length)
|
||
//标识是否是已提交人员,若为已提交人员,则不允许修改体检结果,也不加载项目对应的参考结果
|
||
if(isRecheck == 'haveEntry'){
|
||
for(var i=0; i<personList.length; i++){
|
||
if(i==0){
|
||
//默认选中第一个人员
|
||
$("#tool").before('<tr align="center" style="background:#D1E9E9" id="nameClicks'+personList[0][0]+'" onclick="setBgColorsOfCommited(\''+personList[0][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[0][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[0][3]+'</font></td>'+
|
||
'<td width="10%" height="25px" ><font color="black">'+personList[0][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameids").val('nameClicks'+personList[0][0]);
|
||
//记录当前人员ID,为切换时保存人员信息做准备
|
||
$("#currentPersonId").val(personList[0][0]);
|
||
//生成完表格后,给“人员基本信息”处赋值;默认选中第一个人员的数据
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorssOfCommited('+personList[0][0]+',\''+personProjectList[0][2]+'\')")" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" disabled id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" disabled checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" /></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录 为了提高德诚效率,暂时取消该功能
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':personList[0][0],'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else{
|
||
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorssOfCommited('+personList[0][0]+',\''+personProjectList[j][2]+'\')")" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" disabled id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" disabled checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" ></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" readonly style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
|
||
}
|
||
})
|
||
}else{
|
||
$("#tool").before('<tr align="center" id="nameClicks'+personList[i][0]+'" onclick="setBgColorsOfCommited(\''+personList[i][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[i][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px"><font color="black">'+personList[i][3]+'</font></td>'+
|
||
'<td width="10%" height="25px"><font color="black">'+personList[i][4]+'</font></td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
}else{
|
||
for(var i=0; i<personList.length; i++){
|
||
if(i==0){
|
||
//默认选中第一个人员
|
||
$("#tool").before('<tr align="center" style="background:#D1E9E9" onclick="setBgColors(\''+personList[0][0]+'\',\''+groupId+'\')" id="nameClicks'+personList[0][0]+'" >'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[0][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px"><font color="black">'+personList[0][3]+'</font></td>'+
|
||
'<td width="10%" height="25px" ><font color="black">'+personList[0][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameids").val('nameClicks'+personList[0][0]);
|
||
//记录当前人员ID,为切换时保存人员信息做准备
|
||
$("#currentPersonId").val(personList[0][0]);
|
||
//生成完表格后,给“人员基本信息”处赋值;默认选中第一个人员的数据
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
|
||
//根据人员ID,load对应的体检流程 因德诚只有学生体检,故暂时取消该功能
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[0][3]+'</td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录 为了提高德诚效率,暂时取消该功能
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':personList[0][0],'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else if(j<personProjectList.length-1){
|
||
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss('+personList[0][0]+','+personProjectList[j][2]+')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss('+personList[0][0]+','+personProjectList[j][2]+')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
|
||
}
|
||
})
|
||
}else{
|
||
$("#tool").before('<tr align="center" id="nameClicks'+personList[i][0]+'" onclick="setBgColors(\''+personList[i][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px" ><input type="checkbox" name="checkbox_name" value="'+personList[i][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[i][3]+'</font></td>'+
|
||
'<td width="10%" height="25px" ><font color="black">'+personList[i][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
}
|
||
}
|
||
}
|
||
})
|
||
//每次点击查询后,都将焦点放置在“体检编号”查询上
|
||
$("#physicalNum").focus();
|
||
$("#physicalNum").val('');
|
||
}
|
||
|
||
|
||
//提交前,保存已填写的结果
|
||
//点击“保存”按钮,保存选定用户的信息,但不提交。
|
||
function savePersonInfoBeforeCommit(flag){
|
||
if($("#currentPersonId").val() != ''){
|
||
var pArray = $("#projectIdArray").val();
|
||
if(pArray == ''){
|
||
return;
|
||
}
|
||
|
||
//使用二维数组装载检查项目数据
|
||
var pArrays = ($("#projectIdArray").val().split(","));
|
||
|
||
var reulstList=new Array();
|
||
var resultFlag = 1;
|
||
for(var i=0;i<pArrays.length-1;i++){
|
||
reulstList[i]=new Array();
|
||
for(var j=0;j<5;j++){
|
||
if(j==0){
|
||
if($("#projectResult"+pArrays[i]).val() == ''){
|
||
reulstList[i][0] = 'emptyResult';
|
||
resultFlag = 0;
|
||
}else{
|
||
reulstList[i][0] = $("#projectResult"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==1){
|
||
if($("#isLoss"+pArrays[i]).is(":checked")){
|
||
reulstList[i][1] = 'loss';
|
||
}
|
||
}
|
||
if(j==2){
|
||
if($("#isQualified"+pArrays[i]).is(":checked")){
|
||
reulstList[i][2] = 'qualified';
|
||
}
|
||
}
|
||
if(j==3){
|
||
if($("#remark"+pArrays[i]).val() == ''){
|
||
reulstList[i][3] = 'emptyResult';
|
||
}else{
|
||
reulstList[i][3] = $("#remark"+pArrays[i]).val();
|
||
}
|
||
}
|
||
if(j==4){
|
||
reulstList[i][4] = '@';
|
||
}
|
||
}
|
||
}
|
||
if(resultFlag==1){
|
||
$.get("professionalExamResultsEntry.do?method=saveProjectResultWhenClickSave&reulstList="+encodeURI(encodeURI(reulstList)),{'personId':$("#currentPersonId").val(),'pArray':pArray},function(data,status){
|
||
if(flag=="commit"){
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
if(confirm("确认提交当前信息吗?")){
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}else{ return false;}
|
||
|
||
}
|
||
}
|
||
//获取当前小组ID
|
||
var groupId = $("#currentGroupId").val();
|
||
if(groupId == ''){
|
||
alert("请选择授权项目!");
|
||
return;
|
||
}
|
||
var haveEntry;
|
||
var normal;
|
||
var reCheck;
|
||
var all;
|
||
|
||
if($("#haveEntry").is(":checked")){
|
||
haveEntry = 'haveEntry';
|
||
}
|
||
if($("#normal").is(":checked")){
|
||
normal = 'normal';
|
||
}
|
||
if($("#reCheck").is(":checked")){
|
||
reCheck = 'reCheck';
|
||
}
|
||
if($("#all").is(":checked")){
|
||
all = 'all';
|
||
}
|
||
|
||
var physicalNum = $("#physicalNum").val();
|
||
var pjName = $("#pjName").val();
|
||
var qName = $("#qName").val();
|
||
var qGender = $("#qGender").val();
|
||
var qCheckType = $("#qCheckType").val();
|
||
var registryStart = $("#registryStart").val();
|
||
var registryEnd = $("#registryEnd").val();
|
||
var examStart = $("#examStart").val();
|
||
var examEnd = $("#examEnd").val();
|
||
var searchUtil = $("#searchUtil").val();
|
||
|
||
|
||
//删除所有人员信息
|
||
$("#table1 tr:not(:last)").remove();
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有结果参考信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
//Ext.MessageBox.wait("正在提交...", "等待");
|
||
//执行查询,并生成人员列表
|
||
$.post("professionalExamResultsEntry.do?method=commitPersonResult",{'currentGroupId':groupId,'pjName':pjName,'personIdArray':personIdArray,'physicalNum':physicalNum,'haveEntry':haveEntry,'normal':normal,'reCheck':reCheck,'qName':qName,'qGender':qGender,'qCheckType':qCheckType,'registryStart':registryStart,'registryEnd':registryEnd,'examStart':examStart,'examEnd':examEnd,'all':all,'searchUtil':searchUtil},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personList = Data.personList;
|
||
var isBlank = Data.isBlank;
|
||
if(isBlank == 'blank'){
|
||
alert("尚有体检结果为空,提交失败!");
|
||
}
|
||
// setInterval(closeext, 1000);
|
||
// $("#physicalNum").focus();
|
||
//给条数赋值
|
||
/* $("#totalCount").val(personList.length); */
|
||
//queryPersonList();
|
||
|
||
//给条数赋值
|
||
$("#totalCount").val(personList.length)
|
||
for(var i=0; i<personList.length; i++){
|
||
if(i==0){
|
||
//默认选中第一个人员
|
||
$("#tool").before('<tr align="center" style="background:#D1E9E9" onclick="setBgColors(\''+personList[0][0]+'\',\''+groupId+'\')" id="nameClicks'+personList[0][0]+'" >'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[0][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px"><font color="black">'+personList[0][3]+'</font></td>'+
|
||
'<td width="10%" height="25px"><font color="black">'+personList[0][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameids").val('nameClicks'+personList[0][0]);
|
||
//记录当前人员ID,为切换时保存人员信息做准备
|
||
$("#currentPersonId").val(personList[0][0]);
|
||
//生成完表格后,给“人员基本信息”处赋值;默认选中第一个人员的数据
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][17]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
if(personInfoList[0][68]==null && personInfoList[0][68]=="" && personInfoList[0][69]!=null && personInfoList[0][69]!=""){
|
||
$("#personValue9").val(personInfoList[0][69]+"月");
|
||
}
|
||
if(personInfoList[0][68]!=null && personInfoList[0][68]!="" && personInfoList[0][69]==null && personInfoList[0][69]==""){
|
||
$("#personValue9").val(personInfoList[0][68]+"年");
|
||
}
|
||
if(personInfoList[0][68]!=null && personInfoList[0][68]!="" && personInfoList[0][69]!=null && personInfoList[0][69]!=""){
|
||
$("#personValue9").val(personInfoList[0][68]+"年"+personInfoList[0][69]+"月");
|
||
}
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
var sonProcessList=processList[n].sonProcessList;
|
||
var str='<tr><td><div id="father'+n+'">'+
|
||
'<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >'+
|
||
'<tr id="tr'+n+'" align="center" > '+
|
||
'<td id="td'+n+'" width="2%" height="20" style="border-bottom: 1px solid #ccc;border-right:1px solid #ccc;" >';
|
||
if(sonProcessList.length>0){
|
||
str+='<a href="###" onclick="changeDiv('+n+')"><img id="img'+n+'" src="/dccdc/img/nolines_plus.gif" width="22px" height="22px"/></a> ';
|
||
}else{
|
||
str+='<img id="img'+n+'" src="/dccdc/img/nolines_minus.gif" width="22px" height="22px"/> ';
|
||
}
|
||
str+='</td>'+
|
||
'<td width="10%"><font color="black">'+processList[n].group_name+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n].exam_group_maintain_id+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n].exam_group_maintain_id+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n].exam_group_maintain_id+'"/></td>'+
|
||
'</tr>'+
|
||
'</table>'+
|
||
'</div>'+
|
||
'<div id="son'+n+'" style="display:none">'+
|
||
'<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" >';
|
||
|
||
for(var m=0;m<sonProcessList.length;m++){
|
||
str+='<tr align="center" > '+
|
||
'<td width="2%" height="20" style="border-bottom: 1px solid #ccc;border-right:1px solid #ccc;" >';
|
||
if(m==(sonProcessList.length-1)){
|
||
str+='<img src="/dccdc/img/joinbottom.gif" width="12px" height="12px"/>';
|
||
}else{
|
||
str+='<img src="/dccdc/img/join.gif" width="12px" height="12px"/>';
|
||
}
|
||
|
||
str+='</td>'+
|
||
'<td width="10%"><font color="black">'+sonProcessList[m].group_name+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+sonProcessList[m].exam_group_maintain_id+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+sonProcessList[m].exam_group_maintain_id+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+sonProcessList[m].exam_group_maintain_id+'"/></td>'+
|
||
'</tr>';
|
||
}
|
||
str+='</table>'+
|
||
'</div></td></tr>';
|
||
|
||
$("#process").before(str);
|
||
|
||
if(processList[n].is_entry == '已录'){
|
||
$("#processResult"+processList[n].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
if(processList[n].is_review == '已复核'){
|
||
$("#reViewResult"+processList[n].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
if(processList[n].is_complete == '已完成'){
|
||
$("#completeStatus"+processList[n].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
for(var m=0;m<sonProcessList.length;m++){
|
||
if(sonProcessList[m].is_entry == '已录'){
|
||
$("#processResult"+sonProcessList[m].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
if(sonProcessList[m].is_review == '已复核'){
|
||
$("#reViewResult"+sonProcessList[m].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
if(sonProcessList[m].is_complete == '已完成'){
|
||
$("#completeStatus"+sonProcessList[m].exam_group_maintain_id).attr("checked", true);
|
||
}
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' ondblclick="addAdvise(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
$("#adviseResult").val(personProjectList[0][5].split("、")[0]);
|
||
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" onmouseout="hideTip(this)" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onmouseover="setBgColorsss(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\')" >'+
|
||
'<td height="25px" id="initResult"> '+projectResultList[0][3]+'</td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" onmouseout="hideTip(this)" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onmouseover="setBgColorsss(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':personList[0][0],'groupId':groupId},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][4]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.background="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' ondblclick="addAdvise(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly size="16" style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
|
||
})
|
||
}else{
|
||
$("#tool").before('<tr align="center" id="nameClicks'+personList[i][0]+'" onclick="setBgColors(\''+personList[i][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px" ><input type="checkbox" name="checkbox_name" value="'+personList[i][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[i][3]+'</font></td>'+
|
||
'<td width="10%" height="25px"><font color="black">'+personList[i][4]+'</font></td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
// $("#adviseResult").val("");
|
||
}
|
||
});
|
||
alert("提交成功 !");
|
||
return true;
|
||
}else {
|
||
alert("尚有体检结果为空,提交失败!");
|
||
return false;
|
||
}
|
||
$("#physicalNum").focus();
|
||
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
/* return true;
|
||
}else {
|
||
alert("尚有体检结果为空,提交失败!");
|
||
return false;
|
||
|
||
}
|
||
}
|
||
}
|
||
*/
|
||
|
||
|
||
|
||
|
||
|
||
//点击提交人员检查结果,更新体检流程表中的结果录入及小组完成
|
||
function commitPerson(){
|
||
if($("#haveEntry").is(":checked")){
|
||
alert("已录入数据不能重复提交!")
|
||
return;
|
||
}
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button1").style.backgroundColor="#F5FFE8";
|
||
document.getElementById("button2").style.backgroundColor="#F5FFE8";
|
||
document.getElementById("button4").style.backgroundColor="#F5FFE8";
|
||
document.getElementById("button5").style.backgroundColor="#F5FFE8";
|
||
document.getElementById("button6").style.backgroundColor="#F5FFE8";
|
||
|
||
$("#physicalNum").focus();
|
||
//点击列表load人员信息前保存现有数据
|
||
savePersonInfoBeforeCommit("commit");
|
||
/* //点击列表load人员信息前保存现有数据
|
||
savePersonInfoBeforeCommit();
|
||
setTimeout(store,500); */
|
||
|
||
|
||
}
|
||
function store(){
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
/* if(confirm("确认提交当前信息吗?")){ personIdArray = ','+$("#currentPersonId").val()+',';}else{ return false;} */
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}
|
||
}
|
||
|
||
|
||
//获取当前小组ID
|
||
var groupId = $("#currentGroupId").val();
|
||
if(groupId == ''){
|
||
alert("请选择授权项目!");
|
||
return;
|
||
}
|
||
var haveEntry;
|
||
var normal;
|
||
var reCheck;
|
||
var all;
|
||
|
||
if($("#haveEntry").is(":checked")){
|
||
haveEntry = 'haveEntry';
|
||
}
|
||
if($("#normal").is(":checked")){
|
||
normal = 'normal';
|
||
}
|
||
if($("#reCheck").is(":checked")){
|
||
reCheck = 'reCheck';
|
||
}
|
||
if($("#all").is(":checked")){
|
||
all = 'all';
|
||
}
|
||
|
||
var physicalNum = $("#physicalNum").val();
|
||
var qName = $("#qName").val();
|
||
var qGender = $("#qGender").val();
|
||
var qCheckType = $("#qCheckType").val();
|
||
var registryStart = $("#registryStart").val();
|
||
var registryEnd = $("#registryEnd").val();
|
||
var examStart = $("#examStart").val();
|
||
var examEnd = $("#examEnd").val();
|
||
var searchUtil = $("#searchUtil").val();
|
||
var collectStart = $("#collectStart").val();
|
||
var collectEnd = $("#collectEnd").val();
|
||
|
||
|
||
//删除所有人员信息
|
||
$("#table1 tr:not(:last)").remove();
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有结果参考信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
//执行查询,并生成人员列表
|
||
$.post("professionalExamResultsEntry.do?method=commitPersonResult",{'currentGroupId':groupId,'personIdArray':personIdArray,'physicalNum':physicalNum,'haveEntry':haveEntry,'normal':normal,'reCheck':reCheck,'qName':qName,'qGender':qGender,'qCheckType':qCheckType,'registryStart':registryStart,'registryEnd':registryEnd,'examStart':examStart,'examEnd':examEnd,'all':all,'searchUtil':searchUtil,'collectStart':collectStart,'collectEnd':collectEnd},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personList = Data.personList;
|
||
var isBlank = Data.isBlank;
|
||
if(isBlank == 'blank'){
|
||
alert("尚有体检结果为空,提交失败!");
|
||
}
|
||
//给条数赋值
|
||
$("#totalCount").val(personList.length)
|
||
for(var i=0; i<personList.length; i++){
|
||
if(i==0){
|
||
//默认选中第一个人员
|
||
$("#tool").before('<tr align="center" style="background:#D1E9E9" onclick="setBgColors(\''+personList[0][0]+'\',\''+groupId+'\')" id="nameClicks'+personList[0][0]+'" >'+
|
||
'<td width="7%" height="25px"><input type="checkbox" name="checkbox_name" value="'+personList[0][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[0][3]+'</font></td>'+
|
||
'<td width="10%" height="25px" ><font color="black">'+personList[0][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
$("#nameids").val('nameClicks'+personList[0][0]);
|
||
//记录当前人员ID,为切换时保存人员信息做准备
|
||
$("#currentPersonId").val(personList[0][0]);
|
||
//生成完表格后,给“人员基本信息”处赋值;默认选中第一个人员的数据
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
|
||
|
||
//根据人员ID,load对应的体检流程
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':personList[0][0]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[0][3]+'</td>'+
|
||
'</tr>');
|
||
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':personList[0][0],'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly size="16" style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly size="16" style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
|
||
}
|
||
})
|
||
}else{
|
||
$("#tool").before('<tr align="center" id="nameClicks'+personList[i][0]+'" onclick="setBgColors(\''+personList[i][0]+'\',\''+groupId+'\')">'+
|
||
'<td width="7%" height="25px" ><input type="checkbox" name="checkbox_name" value="'+personList[i][0]+'" onclick="checkRecord(this)"/></td>'+
|
||
'<td width="14%" height="25px" ><font color="black">'+personList[i][3]+'</font></td>'+
|
||
'<td width="10%" height="25px" ><font color="black">'+personList[i][4]+'</font></td>'+
|
||
'</tr>');
|
||
|
||
}
|
||
}
|
||
})
|
||
$("#physicalNum")[0].focus();
|
||
$("#physicalNum").focus();
|
||
}
|
||
|
||
|
||
|
||
//查漏-弹出窗口
|
||
var win2;
|
||
function search(winTitle){
|
||
//获取当前小组ID
|
||
var groupId = $("#currentGroupId").val();
|
||
var currentPersonId = $("#currentPersonId").val();
|
||
var url;
|
||
if(winTitle == '结果录入-查漏'){
|
||
if(groupId == ''){
|
||
alert("请选择授权项目!");
|
||
return;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=search&groupId="+groupId;
|
||
}else if(winTitle == '结果录入-相关资料'){
|
||
if(currentPersonId == ''){
|
||
alert("请选择体检人员!");
|
||
return false;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=datumOfPerson¤tPersonId="+currentPersonId;
|
||
}else if(winTitle == '结果录入-问诊'){
|
||
if(currentPersonId == ''){
|
||
alert("请选择体检人员!");
|
||
return false;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=askPersonSituation¤tPersonId="+currentPersonId;
|
||
}
|
||
|
||
var height = document.body.clientHeight * 0.9;
|
||
var width = document.body.clientWidth * 0.9;
|
||
win2= new Ext.Window({
|
||
renderTo:Ext.getBody(),
|
||
title:winTitle,
|
||
closable:true,
|
||
y:2,
|
||
width:860,
|
||
height:400+35,
|
||
layout:'fit',
|
||
autoHeigth:true,
|
||
draggable:false,//不允许拖动
|
||
modal:true,//遮罩属性
|
||
html:"<iframe src='"+url+"' width='"+845+"', height='"+400+"', top=0, frameborder=0></iframe>"
|
||
});
|
||
win2.show(this);
|
||
}
|
||
|
||
|
||
//提醒、资料-弹出窗口
|
||
var win3;
|
||
function iframe(winTitle){
|
||
var groupId = $("#currentGroupId").val();
|
||
var currentPersonId = $("#currentPersonId").val();
|
||
var url;
|
||
if(winTitle == '结果录入-提醒'){
|
||
//获取当前小组ID
|
||
if(groupId == '' || currentPersonId == ''){
|
||
alert("请选择授权项目与体检人员!");
|
||
return false;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=noticeByGroupAndPersonId&groupId="+groupId+"¤tPersonId="+currentPersonId;
|
||
}else if(winTitle == '结果录入-历史记录'){
|
||
if(currentPersonId == ''){
|
||
alert("请选择体检人员!");
|
||
return false;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=historyResultOfPerson¤tPersonId="+currentPersonId;
|
||
}else if(winTitle == '结果录入-单项记录'){
|
||
if(currentPersonId == ''){
|
||
alert("请选择体检人员!");
|
||
return false;
|
||
}
|
||
url = "professionalExamResultsEntry.do?method=singleResultOfPerson¤tPersonId="+currentPersonId+"¤tProjectId="+$("#currentProjectId").val();
|
||
}
|
||
|
||
|
||
var height = document.body.clientHeight * 0.9;
|
||
var width = document.body.clientWidth * 0.9;
|
||
win3= new Ext.Window({
|
||
renderTo:Ext.getBody(),
|
||
title:winTitle,
|
||
closable:true,
|
||
y:2,
|
||
width:660,
|
||
height:340+35,
|
||
layout:'fit',
|
||
frame:true,//圆角
|
||
autoHeigth:true,
|
||
draggable:false,//不允许拖动
|
||
modal:true,//遮罩属性
|
||
html:"<iframe src='"+url+"' width='"+645+"', height='"+340+"', top=0, frameborder=0></iframe>"
|
||
});
|
||
win3.show(this);
|
||
}
|
||
|
||
|
||
//获取LIS中体检数据
|
||
function getLisData(){
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
var groupId = $("#currentGroupId").val();
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}
|
||
}
|
||
|
||
$.post("professionalExamResultsEntry.do?method=getLisData",{'currentGroupId':groupId,'personIdArray':personIdArray},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var isComplete = Data.isComplete;
|
||
if(isComplete == "yes"){
|
||
alert("获取成功!");
|
||
reloadPersonInfoAfterGetData();
|
||
}else{
|
||
alert("获取失败!");
|
||
}
|
||
});
|
||
|
||
|
||
}
|
||
|
||
|
||
|
||
//获取数据后,重新刷新项目、结果参考、历史记录列表
|
||
function reloadPersonInfoAfterGetData(){
|
||
var currentPersonId = $("#currentPersonId").val();
|
||
var groupId = $("#currentGroupId").val();
|
||
//给“人员基本信息”赋值
|
||
$.post("professionalExamResultsEntry.do?method=getPersonInfoById",{'personId':currentPersonId},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personInfoList = Data.personInfoList;
|
||
$("#personValue1").val(personInfoList[0][2]);
|
||
$("#personValue2").val(personInfoList[0][4]);
|
||
$("#personValue3").val(personInfoList[0][5]);
|
||
$("#personValue4").val(personInfoList[0][14]);
|
||
$("#personValue5").val(personInfoList[0][26]);
|
||
$("#personValue6").val(personInfoList[0][6]);
|
||
$("#personValue7").val(personInfoList[0][8]);
|
||
$("#personValue8").val(personInfoList[0][9]);
|
||
$("#personValue9").val(personInfoList[0][45]);
|
||
$("#personValue10").val(personInfoList[0][28]);
|
||
$("#personValue11").val(personInfoList[0][65]);
|
||
$("#personValue12").val(personInfoList[0][17]);
|
||
$("#personValue13").val(personInfoList[0][98]);
|
||
$("#personValue14").val(personInfoList[0][99]);
|
||
$("#personValue17").val(personInfoList[0][111]);
|
||
var pic = document.getElementById("picture");
|
||
pic.src = 'data:image/gif;base64, '+personInfoList[0][27]+'';
|
||
})
|
||
|
||
//给“人员基本信息”赋值
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
//删除所有参考结果信息
|
||
$("#table3 tr:not(:last)").remove();
|
||
//删除所有历史记录信息
|
||
$("#table4 tr:not(:last)").remove();
|
||
//删除所有体检流程信息
|
||
$("#table5 tr:not(:last)").remove();
|
||
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员ID,load对应的体检流程 因德诚只有学生体检,故暂时取消该功能
|
||
$.post("professionalExamResultsEntry.do?method=getProcessByPersonId",{'personId':currentPersonId},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var processList = Data.processList;
|
||
for(var n=0; n<processList.length; n++){
|
||
$("#process").before('<tr align="center" >'+
|
||
'<td width="10%"><font color="black">'+processList[n][3]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" id="processResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="reViewResult'+processList[n][0]+'"/></td>'+
|
||
'<td width="3%"><input type="checkbox" id="completeStatus'+processList[n][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(processList[n][4] == '已录'){
|
||
$("#processResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][6] == '已复核'){
|
||
$("#reViewResult"+processList[n][0]).attr("checked", true);
|
||
}
|
||
if(processList[n][8] == '已完成'){
|
||
$("#completeStatus"+processList[n][0]).attr("checked", true);
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':currentPersonId},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+currentPersonId+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+currentPersonId+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
|
||
//根据项目编号,load出相对应的参考结果
|
||
$.post("professionalExamResultsEntry.do?method=getProjectResultList",{'projectId':personProjectList[0][2]},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var projectResultList = Data.projectResultList;
|
||
for(var k=0; k<projectResultList.length; k++){
|
||
if(k == 0){
|
||
$("#toolss").before('<tr style="background:#D1E9E9" align="left" id="nameClicksss'+projectResultList[0][0]+'" ondblclick="setResultToProject(\''+projectResultList[0][0]+'\',\''+projectResultList[0][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[0][4]+'\');" onclick="setBgColorsss(\''+projectResultList[0][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
$("#nameidsss").val('nameClicksss'+projectResultList[0][0]);
|
||
|
||
}else{
|
||
$("#toolss").before('<tr align="left" id="nameClicksss'+projectResultList[k][0]+'" ondblclick="setResultToProject(\''+projectResultList[k][0]+'\',\''+projectResultList[k][3]+'\',\''+personProjectList[0][2]+'\',\''+projectResultList[k][4]+'\');" onclick="setBgColorsss(\''+projectResultList[k][0]+'\')" >'+
|
||
'<td height="25px"> '+projectResultList[k][3]+'</td>'+
|
||
'</tr>');
|
||
}
|
||
}
|
||
})
|
||
|
||
|
||
//根据人员id和项目编号查找出往年相关的历史记录
|
||
$.post("professionalExamResultsEntry.do?method=loadHistoryRecord",{'personId':currentPersonId,'projectId':personProjectList[j][2]},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var projectHistoryList = Data.projectHistoryList;
|
||
for(var m=0; m<projectHistoryList.length; m++){
|
||
$("#toolsss").before('<tr align="center" id="history'+projectHistoryList[m][0]+'">'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][1]+'</font></td>'+
|
||
'<td width="4%"><font color="black">'+projectHistoryList[m][2]+'</font></td>'+
|
||
'<td width="3%"><input type="checkbox" disabled id="historyQualified'+projectHistoryList[m][0]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
if(projectHistoryList[m][3] == '合格'){
|
||
$("#historyQualified"+projectHistoryList[m][0]).attr("checked", true);
|
||
}else if(projectHistoryList[m][3] == '不合格'){
|
||
document.getElementById("history"+projectHistoryList[m][0]).style.color="#FF5151";
|
||
}
|
||
}
|
||
})
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+currentPersonId+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+currentPersonId+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')" /></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";1
|
||
}
|
||
}
|
||
})
|
||
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
//对提交结果进行撤销,撤销前校验选择需撤销的人员是否允许撤销。若允许撤销:
|
||
//1.先判断此人所在的小组是否需要审核,若需要审核,且审核人已提交结果,则不允许撤销,一定要等待审核人撤销审核方可撤销体检结果重新进行修改
|
||
//2.若此人所在的小组不需要审核,则更改该小组对应的流程,将is_complete字段重置为空即可.
|
||
function rollBack(){
|
||
if($("#haveEntry").attr("checked")){
|
||
var personIdArray = $("#personIdArray").val();
|
||
var currentPersonId = $("#currentPersonId").val();
|
||
//若未勾选任何人员,则默认撤销当前着色的人员
|
||
if(currentPersonId != ''){
|
||
//将需要撤销的人员ID传至后台判断是否允许撤销,无论成功与否都给予友好提示
|
||
$.post("professionalExamResultsEntry.do?method=rollbackProcess",{'personIdArray':personIdArray,'currentPersonId':currentPersonId,'currentGroupId':$("#currentGroupId").val()},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var notice = Data.rollbackNotice;
|
||
if(notice != ''){
|
||
alert(notice);
|
||
//提示后重新加载信息
|
||
queryPersonList("re");
|
||
}
|
||
})
|
||
}else{
|
||
alert("未选择需要撤销的人员,请选择!");
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
|
||
|
||
|
||
|
||
|
||
|
||
//缺项操作,更新体检流程表中的结果录入及小组完成
|
||
function lackProject(){
|
||
document.getElementById("button5").style.backgroundColor="#BFCA68";
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
var groupId = $("#currentGroupId").val();
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}
|
||
}
|
||
|
||
$.post("professionalExamResultsEntry.do?method=savePersonInfoBeforeLack",{'currentGroupId':groupId,'personIdArray':personIdArray},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var isComplete = Data.isComplete;
|
||
if(isComplete == "yes"){
|
||
alert("操作成功!");
|
||
reloadPersonInfoAfterGetData();
|
||
}else{
|
||
alert("操作失败!");
|
||
}
|
||
});
|
||
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':$("#currentPersonId").val()},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
//根据项目编号,load出相对应的参考结果
|
||
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+$("#currentPersonId").val()+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+$("#currentPersonId").val()+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" ondblclick="popUpBox(id ,\''+personProjectList[j][3]+'\',\''+personProjectList[j][5]+'\')" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
//设置体检项目默认值
|
||
function setDefaultValue(){
|
||
document.getElementById("button6").style.backgroundColor="#BFCA68";
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
var groupId = $("#currentGroupId").val();
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}
|
||
}
|
||
|
||
$.post("professionalExamResultsEntry.do?method=setDefaultValue",{'currentGroupId':groupId,'personIdArray':personIdArray},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var isComplete = Data.isComplete;
|
||
if(isComplete == "yes"){
|
||
alert("设置默认值成功!");
|
||
reloadPersonInfoAfterGetData();
|
||
}else{
|
||
alert("设置默认值失败!");
|
||
}
|
||
});
|
||
|
||
//删除所有检查项目信息
|
||
$("#table2 tr:not(:last)").remove();
|
||
setInterval(threadWait, 500);
|
||
|
||
//根据人员及小组,load出对应的检查项目
|
||
$.post("professionalExamResultsEntry.do?method=getPersonProjectInfoById",{'groupId':groupId,'personId':$("#currentPersonId").val()},function(data,status){
|
||
var Data = eval('('+data+')');
|
||
var personProjectList = Data.personProjectList;
|
||
$("#projectIdArray").val('');
|
||
for(var j=0; j<personProjectList.length; j++){
|
||
$("#projectIdArray").val($("#projectIdArray").val() + personProjectList[j][2]+",");
|
||
//默认选中第一个检查项目
|
||
if(j == 0){
|
||
if(personProjectList.length==1){
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr style="background:#D1E9E9" id="nameClickss'+personProjectList[0][2]+'" onclick="setBgColorss(\''+personList[0][0]+'\',\''+personProjectList[0][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[0][2]+'">'+personProjectList[0][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font style="color:black"><textarea tabindex='+(j+1)+' id="projectResult'+personProjectList[0][2]+'" name="projectResult'+personProjectList[0][2]+'" ondblclick="popUpBox(id ,\''+personProjectList[0][3]+'\',\''+personProjectList[0][5]+'\')" onblur="compareStandard(this,\''+personProjectList[0][2]+'\',\''+personProjectList[0][7]+'\')" onkeydown="if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%" onfocus="getTitle(this)">'+personProjectList[0][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[0][2]+'" name="standardResult'+personProjectList[0][2]+'" title="'+personProjectList[0][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[0][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[0][2]+'" name="isLoss'+personProjectList[0][2]+'" onclick="changeResult(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[0][2]+'" name="isQualified'+personProjectList[0][2]+'" onclick="changeIsQualified(\''+personProjectList[0][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[0][2]+'" name="remark'+personProjectList[0][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[0][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[0][2]+'" value="'+personProjectList[0][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
$("#nameidss").val('nameClickss'+personProjectList[0][2]);
|
||
//记录当前的体检项目编号
|
||
$("#currentProjectId").val(personProjectList[0][2]);
|
||
//根据项目编号,load出相对应的参考结果
|
||
|
||
}else if(j<personProjectList.length-1){
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+$("#currentPersonId").val()+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')}if(event.keyCode==40){turnDown(\''+personProjectList[j+1][2]+'\')};" id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}else{
|
||
$("#tools").before('<tr id="nameClickss'+personProjectList[j][2]+'" style="" onclick="setBgColorss(\''+$("#currentPersonId").val()+'\',\''+personProjectList[j][2]+'\')" >'+
|
||
'<td align="center" width="20%" height="40px"><font id="projectName'+personProjectList[j][2]+'">'+personProjectList[j][3]+'</font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea tabindex='+(j+1)+' onkeydown="if(event.keyCode==38){turnUp(\''+personProjectList[j-1][2]+'\')};" id="projectResult'+personProjectList[j][2]+'" name="projectResult'+personProjectList[j][2]+'" onblur="compareStandard(this,\''+personProjectList[j][2]+'\',\''+personProjectList[j][7]+'\')" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][5]+'</textarea></font></td>'+
|
||
'<td align="left" width="20%" height="40px"><font color="black"><textarea id="standardResult'+personProjectList[j][2]+'" name="standardResult'+personProjectList[j][2]+'" title="'+personProjectList[j][16]+'" readonly style="background-color:transparent;border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:98%">'+personProjectList[j][16]+'</textarea></font></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="loss" id="isLoss'+personProjectList[j][2]+'" name="isLoss'+personProjectList[j][2]+'" onclick="changeResult(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="center" width="4%" height="40px"><input type="checkbox" value="qualified" checked id="isQualified'+personProjectList[j][2]+'" name="isQualified'+personProjectList[j][2]+'" onclick="changeIsQualified(\''+personProjectList[j][2]+'\')"/></td>'+
|
||
'<td align="left" width="10%" height="40px"><textarea id="remark'+personProjectList[j][2]+'" name="remark'+personProjectList[j][2]+'" style="border:1px;border-bottom-style:none;border-top-style:none;border-left-style:none;border-right-style:none;height:30px;width:96%">'+personProjectList[j][8]+'</textarea><input type="hidden" id="judgeModel'+personProjectList[j][2]+'" value="'+personProjectList[j][18]+'"/></td>'+
|
||
'</tr>');
|
||
}
|
||
|
||
if(personProjectList[j][6] == '缺项'){
|
||
$("#isLoss"+personProjectList[j][2]).attr("checked", true);
|
||
}
|
||
if(personProjectList[j][7] == '不合格'){
|
||
$("#isQualified"+personProjectList[j][2]).attr("checked", false);
|
||
document.getElementById("projectName"+personProjectList[j][2]).style.color="red";
|
||
}
|
||
}
|
||
})
|
||
}
|
||
|
||
|
||
//刷条码时检查结果,如果当前所有项目都有结果,则提交
|
||
function AutoCommit(){
|
||
document.getElementById("button3").style.backgroundColor="#CC66FF";
|
||
document.getElementById("button1").style.backgroundColor="#f5f7ff";
|
||
//document.getElementById("button2").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button4").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button5").style.backgroundColor="#f5f7ff";
|
||
document.getElementById("button6").style.backgroundColor="#f5f7ff";
|
||
|
||
//先判断是否通过勾选列表选择的人员还是提交当前患者
|
||
var personIdArray = $("#personIdArray").val();
|
||
|
||
if(personIdArray.length <= 1){ //说明属于提交当前患者
|
||
if($("#currentPersonId").val().length ==0){
|
||
return;
|
||
}else{
|
||
personIdArray = ','+$("#currentPersonId").val()+',';
|
||
}
|
||
}
|
||
|
||
|
||
//获取当前小组ID
|
||
var groupId = $("#currentGroupId").val();
|
||
if(groupId == ''){
|
||
return;
|
||
}
|
||
|
||
//点击列表load人员信息前保存现有数据
|
||
// if(savePersonInfoBeforeCommit() == false){
|
||
// return;
|
||
// }
|
||
|
||
|
||
var haveEntry;
|
||
var normal;
|
||
var reCheck;
|
||
var all;
|
||
|
||
if($("#haveEntry").is(":checked")){
|
||
haveEntry = 'haveEntry';
|
||
}
|
||
if($("#normal").is(":checked")){
|
||
normal = 'normal';
|
||
}
|
||
if($("#reCheck").is(":checked")){
|
||
reCheck = 'reCheck';
|
||
}
|
||
if($("#all").is(":checked")){
|
||
all = 'all';
|
||
}
|
||
|
||
var physicalNum = $("#physicalNum").val();
|
||
var qName = $("#qName").val();
|
||
var qGender = $("#qGender").val();
|
||
var qCheckType = $("#qCheckType").val();
|
||
var registryStart = $("#registryStart").val();
|
||
var registryEnd = $("#registryEnd").val();
|
||
var examStart = $("#examStart").val();
|
||
var examEnd = $("#examEnd").val();
|
||
|
||
//执行查询,并生成人员列表
|
||
$.post("professionalExamResultsEntry.do?method=commitPersonResult",{'currentGroupId':groupId,'personIdArray':personIdArray,'physicalNum':physicalNum,'haveEntry':haveEntry,'normal':normal,'reCheck':reCheck,'qName':qName,'qGender':qGender,'qCheckType':qCheckType,'registryStart':registryStart,'registryEnd':registryEnd,'examStart':examStart,'examEnd':examEnd,'all':all},function(data,status){
|
||
var Data = eval('('+data+')') ;
|
||
var personList = Data.personList;
|
||
var isBlank = Data.isBlank;
|
||
});
|
||
}
|
||
|
||
</script>
|
||
} |