var sFeatures = "toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, status=yes;"; var finalheight = 0; //最后的高度 var he = 0; //初始高度 var finalWidth = 0; //最后的宽 var wid = 0; //初始宽 var dragable = false;//默认不可拖拽 var Insurance = false; var oldY = '';//记录第一次的鼠标位置 var oldX = '';//记录第一次的鼠标位置 var right_box; var right_btn; var rightDiv; var bottom_btn; var bottom_div; var svgDiv; var svgSize =1; var tState = 1; var svgParent; var bnts; var common; var turnPage2 = new turnPageClass(); //单击延时触发 var rightBtn = function (e) { var divHe; right_div = document.getElementById('InsuranceInfo'); right_btn = document.getElementById('right_btn'); svgDiv = document.getElementById('svg_div'); bnts = document.getElementById('bnts'); if (right_div.offsetWidth == 0) { right_div.style.width = '355px' finalWidth = 355; divHe =232; right_btn.src = './image/right.png'; right_div.style.display='block'; } else { right_div.style.width = 0; finalWidth = 0; divHe = 216; right_div.style.display='none'; right_btn.src = './image/left.png'; } svgDiv.style.width = document.documentElement.clientWidth- right_div.style.width.slice(0, -2)-divHe + 'px'; bnts.style.left = document.documentElement.clientWidth- right_div.style.width.slice(0, -2) - divHe - 35 + 'px'; } var bottomBtn = function (e) { bottom_div = document.getElementById('DivFamilytreeGrid'); bottom_btn = document.getElementById('bottom_btn'); svgDiv = document.getElementById('svg_div'); if (bottom_div.offsetHeight == 0) { bottom_div.style.height = '200px' finalheight = 200; bottom_btn.src = './image/bottom.png' bottom_div.style.display='block'; } else { bottom_div.style.height = 0; finalheight = 0; bottom_div.style.display='none'; bottom_btn.src = './image/top.png'; } right_box.style.height = document.documentElement.clientHeight - bottom_div.style.height.slice(0, -2) -17 + 'px'; svgDiv.style.height = document.documentElement.clientHeight - bottom_div.style.height.slice(0, -2) - 214 + 'px'; } window.onresize = function () { var divHe; bottom_div = document.getElementById('DivFamilytreeGrid'); right_box = document.getElementById('right_box'); svgDiv = document.getElementById('svg_div'); right_div = document.getElementById('InsuranceInfo'); bnts = document.getElementById('bnts'); right_box.style.height = document.documentElement.clientHeight - bottom_div.style.height.slice(0, -2) -17 + 'px' svgDiv.style.height = document.documentElement.clientHeight - bottom_div.style.height.slice(0, -2) - 214 + 'px'; if(right_div.offsetWidth == 0) { divHe =216; }else{ divHe = 232; } svgDiv.style.width = document.documentElement.clientWidth- right_div.style.width.slice(0, -2) - divHe + 'px'; bnts.style.left = document.documentElement.clientWidth- right_div.style.width.slice(0, -2) - divHe - 35 + 'px'; } var startDrag = function (event) { dragable = true; var e = event ? event : window.event; oldY = e.pageY; //记录第一次的鼠标位置 common.classList.add('valid_none'); }; var startDiv = function (event) { Insurance = true; var e = event ? event : window.event; oldX = e.pageX; //记录第一次的鼠标位置 common.classList.add('valid_none'); }; var unDrop = function () { dragable = false; Insurance = false; window.event ? window.event.cancelBubble = true : e.stopPropagation(); }; var endDrop = function () { if (dragable) { finalheight = he; dragable = false; common.classList.remove('valid_none'); }; if (Insurance) { finalWidth = wid; Insurance = false; common.classList.remove('valid_none'); }; }; document.onmouseup = function () { endDrop(); }; document.onmousemove = function (event) { var divHe; right_div = document.getElementById('InsuranceInfo'); var e = event ? event : window.event; if (dragable) { he = oldY - e.pageY + parseInt(finalheight); if(he > 450){ he = 450; } if(he < 0){ he = 0; bottom_btn.src = './image/top.png'; bottom_div.style.display='none'; }else{ bottom_btn.src = './image/bottom.png'; bottom_div.style.display='block'; } bottom_div.style.height = he + 'px'; right_box.style.height = document.documentElement.clientHeight - he -17+'px'; svgDiv.style.height = document.documentElement.clientHeight - he - 214 + 'px'; return false; }; if(Insurance){ wid = oldX - e.pageX + parseInt(finalWidth); if(wid > 400){ wid = 400; } if(wid < 0){ wid = 0; right_btn.src = './image/left.png'; right_div.style.display='none'; }else{ right_div.style.display='block'; right_btn.src = './image/right.png'; } right_div.style.width = wid + 'px'; if(right_div.offsetWidth == 0) { divWid =216; }else{ divWid = 232; } svgDiv.style.width = document.documentElement.clientWidth - wid - divWid + 'px'; bnts.style.left = document.documentElement.clientWidth - wid - divWid - 35 + 'px'; return false; } }; function initUWinfo(json) { var uwInfo = json.uwInfo; var appnt = json.appnt; var contNo = json.contNo; var localeStr = json.I18n; //给div赋值 var table = document.getElementById("DivFamilytreeGrid"); right_box = document.getElementById('right_box'); bottom_box = document.getElementById('bottom_box'); var svg = document.getElementsByTagName("svg"); var mask = document.getElementById("mask"); var loading = document.getElementById("loading"); var amnt = 0; var prem = 0; var appntName; var info ='
| '+i18nMessage("投保人","Polowne-2")+' | '+i18nMessage("客户号","ClientNum-3")+' | '+i18nMessage("投保人类型","PolowneType")+' |
| "+appnt[i][1]+" | "+appnt[i][0]+" | "+appnt[i][2]+" |
| '+i18nMessage("被保人","Insured-2")+' | '+i18nMessage("客户号","ClientNum-3")+' | '+i18nMessage("保额","SI-2")+' | '+i18nMessage("保费","Prem")+' |
| "+uwInfo[i][2]+" | "+uwInfo[i][1]+" | "+uwInfo[i][13]+" | "+uwInfo[i][14]+" |
"+i18nMessage("保单号","PolNum-3")+":"+contNo+"
"+i18nMessage("总保额","TotalSI")+":"+amnt+" "+ i18nMessage("总保费","TotalPrem-2")+":"+prem+"
"; sum =sum+info; right_div.innerHTML=sum; displayMultiline(uwInfo, FamilytreeGrid,FamilytreeGrid); svgValue(1); var problem = document.getElementsByName("FamilytreeGrid9"); for(var i =0;i