您目前尚未登陆,请选择【登陆】或【注册
首页->行政办公->科信客户关系管理系统源码>>images/xt.js>>代码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,不能展示项目的全部,如果想更进一步了解该代码请下载:科信客户关系管理系统源码


当前文件路径:KeXinCrm/images/xt.js 文件类型
普通视图
		            
1var oMouseoverTR; 2var winID = null; 3var x,y; 4var OWinID= null; 5var smsWinID= null; 6//var vurl=''; 7 8function wopen(url,name,w,h) 9{ if (! OWinID || OWinID.closed) 10 { OWinID = window.open(url,name,'height='+h+',width='+w+',top=200,left=300,toolbar=no,menubar=no,scrollbars=no,resizable=no, location=no,status=no') 11 } 12 else 13 { OWinID.focus(); 14 } 15} 16 17function vopen(url,name,w,h) 18{// if (! OWinID || OWinID.closed) 19 OWinID = window.open(url,name,'height='+h+',width='+w+',top=100,left=150,toolbar=no,menubar=no,scrollbars=yes,resizable=yes, location=no,status=no') 20 OWinID.focus(); 21} 22 23function smsopen(tel) 24{ if (smsWinID && smsWinID.open && !smsWinID.closed) 25 { smsWinID.document.sms.dst.value=smsWinID.document.sms.dst.value+'\r\n'+tel; 26 } 27 else 28 { smsWinID = window.open('/usetup/sms.xt?tel='+tel,'','height=400,width=600,top=200,left=300,toolbar=no,menubar=no,scrollbars=yes,resizable=yes, location=no,status=no'); 29 } 30 smsWinID.focus(); 31} 32 33 34function changeRowColor(obj,flag) 35{ if (oMouseoverTR!=null) 36 { oMouseoverTR.style.backgroundColor=''; 37 } 38 if (flag==0) 39 { if (obj!=null) 40 { oMouseoverTR=obj; 41 } 42 var color='#FFFF99'; 43 if(document.all) 44 { if(obj.style.backgroundColor=='') 45 { obj.style.backgroundColor=color; 46 } 47 else 48 { obj.style.backgroundColor=''; 49 } 50 } 51 } 52} 53 54function mm() 55{ x=document.body.scrollLeft+event.clientX; 56 y=document.body.scrollTop+event.clientY; 57}; 58 59function show_me() 60{ mm(); 61 change.style.posLeft=x-20; 62 change.style.posTop=y+10; 63 change.style.visibility='visible'; 64}; 65 66function show_he_view(obj) 67{ obj.style.visibility='visible'; 68}; 69 70function show_he(obj) 71{ mm(); 72 obj.style.posLeft=x-10; 73 obj.style.posTop=y-10; 74 obj.style.visibility='visible'; 75}; 76function hide_he(obj) 77{ obj.style.visibility='hidden'; 78} 79 80function hide_me() 81{ change.style.visibility='hidden'; 82} 83 84function show() 85{ change.style.visibility='visible'; 86} 87 88function winput(ffname,comname,field,dtname,did,crc,ljs) 89{ if (! winID || winID.closed) 90 { winID = window.open('/system/ff.xt?ljs='+ljs+'&ff='+ffname+'&cn='+comname+'&field='+field+'&dtname='+dtname+'&did='+did+'&crc='+crc,"_blank","toolbar=no,resizable,scrollbars,dependent,width=650,height=450"); 91 } 92 else 93 { winID.focus(); 94 } 95} 96 97function wclose() 98{ if (winID && winID.open && !winID.closed) 99 { winID.close(); 100 } 101} 102 103document.write('<iframe id=CalFrame name=CalFrame frameborder=0 src="/css/calendar.htm" style=display:none;position:absolute;z-index:100></iframe>'); 104document.onclick=hideCalendar; 105 106function showCalendar(sImg,bOpenBound,sFld1,sFld2,sCallback) 107{ 108 var fld1,fld2; 109 var cf=document.getElementById("CalFrame"); 110 var wcf=window.frames.CalFrame; 111 var oImg=document.getElementById(sImg); 112 if(!oImg){alert("控制对象不存在!");return;} 113 if(!sFld1){alert("输入控件未指定!");return;} 114 fld1=document.getElementById(sFld1); 115 if(!fld1){alert("输入控件不存在!");return;} 116 if(fld1.tagName!="INPUT"||fld1.type!="text"){alert("输入控件类型错误!");return;} 117 if(sFld2) 118 { 119 fld2=document.getElementById(sFld2); 120 if(!fld2){alert("参考控件不存在!");return;} 121 if(fld2.tagName!="INPUT"||fld2.type!="text"){alert("参考控件类型错误!");return;} 122 } 123 //if(!wcf.bCalLoaded){alert("日历未成功装载!请刷新页面!");return;} 124 if(cf.style.display=="block"){cf.style.display="none";return;} 125 126 var eT=0,eL=0,p=oImg; 127 var sT=document.body.scrollTop,sL=document.body.scrollLeft; 128 var eH=oImg.height+25,eW=oImg.width; 129 while(p&&p.tagName!="BODY"){eT+=p.offsetTop;eL+=p.offsetLeft;p=p.offsetParent;} 130 cf.style.top=(document.body.clientHeight-(eT-sT)-eH>=cf.height)?eT+eH:eT-cf.height; 131 cf.style.left=(document.body.clientWidth-(eL-sL)>=cf.width)?eL:eL+eW-cf.width; 132 cf.style.display="block"; 133 134 wcf.openbound=bOpenBound; 135 wcf.fld1=fld1; 136 wcf.fld2=fld2; 137 wcf.callback=sCallback; 138 wcf.initCalendar(); 139 fld = fld1 140} 141function hideCalendar() 142{ 143 var cf=document.getElementById("CalFrame"); 144 cf.style.display="none"; 145} 146 147var OCFUNC =new Function ('x',''); 148 149function out2select(ss,dt,pf,field) 150{ var s,v; 151 s=document.all["dt_"+dt+"_"+pf+field]; 152 v=document.all["dt_"+dt+"__"+pf+field]; 153 s.length=0; 154 a=0;b=0; 155 while (b==0) 156 { a=ss.indexOf('<DATA><ID>',a); 157 if (a==-1) {b=1;} 158 else 159 { a=a+10; 160 c=ss.indexOf('</ID><NAME>',a); 161 id=ss.substring(a,c); 162 a=c+11; 163 c=ss.indexOf('</NAME></DATA>',a); 164 name=ss.substring(a,c); 165 var oo=new Option(name,id); 166 167 if (id==v.value) 168 { oo.selected=true; 169 } 170 s.add(oo,0); 171 } 172 } 173 174} 175 176 177var x=0; 178var y=0; 179var sx=0; 180var sy=0; 181 182function reportMove() 183{ sx=window.document.body.scrollLeft; 184 sy=window.document.body.scrollTop; 185 x= window.event.x+sx; 186 y=window.event.y+sy; 187} 188 189 190function openpopshow() 191{ 192 var xx=x; 193 var yy=y; 194 var w=document.body.offsetWidth; 195 var h=document.body.offsetHeight+document.body.scrollTop; 196 var width; 197 var height; 198 var left; 199 var top; 200 201 if(w<=480){ 202 width=w; 203 left=0; 204 }else{ 205 width=480; 206 if((w-xx)<=300) left=w-600; 207 else if(xx<=270) left=20; 208 else left=xx-250; 209 } 210 211 if(h<=250){ 212 height=h; 213 top=0; 214 }else{ 215 height=250; 216 if((h-yy)<=250) top=h-260; 217 else top=yy; 218 } 219 popshow.style.left=left; 220 popshow.style.top=top; 221 popshow.style.width=width; 222 popshow.style.height=height; 223 popshow.style.visibility="visible"; 224} 225 226function close_window(){ 227 document.all.popshow.style.visibility="hidden"; 228 document.all.gedit.innerHTML=''; 229 OCFUNC =new Function ('x','');oC_run= new Function('x',''); 230} 231 232 233var ppundis= new Function('x',''); 234 235var dragswitch=0 236var nsx 237var nsy 238var nstemp 239var whichIt = null; 240var dragapproved=false 241 242function drag_dropns(name){ 243 temp=eval(name) 244 temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP) 245 temp.onmousedown=gons 246 temp.onmousemove=dragns 247 temp.onmouseup=stopns 248} 249 250function gons(e){ 251 temp.captureEvents(Event.MOUSEMOVE) 252 nsx=e.x 253 nsy=e.y 254} 255function dragns(e){ 256