azssxmypmx.asp

来自「医院医技科室系统,可以进行医技报告的生成打印,完全的BS结构」· ASP 代码 · 共 186 行

ASP
186
字号
<!-- #INCLUDE FILE="../../share\connectdb.asp" -->
<!--#include file=../../pubfunction.asp-->
<%
dim rs,sqhm,syff
set rs=server.CreateObject("adodb.recordset")	
syff=Request.Form("txtsyff")
if trim(syff)="" then syff=Request.QueryString("syff")
if trim(syff)="" then syff="-1"
qlsh=""
qlsh=Request.Form("txtLSH")
if trim(qlsh)="" then  qlsh=Request.QueryString("lsh") 
if trim(qlsh)="" then qlsh=0	 
mzh=Request.QueryString("mzh")

if trim(Request.Form("txtczzt"))="psjg" then 
   dim cfid,ps
   cfid=Request.Form("txtcfid") 
   ps=Request.Form("txtps") 
   if trim(cfid)="" then cfid=0
   if trim(ps)<>"" then 
		sqlstr="update mz_tcflr	set ps='" &ps & "' where cfid=" &cfid
		conn.Execute sqlstr
   end if
	
end if

%>

<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=JavaScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<link rel="stylesheet" type="text/css" href="../../style/style.css" >
<link rel="stylesheet" type="text/css" href="../../style/table.css" >

</HEAD>
<BODY TOPMARGIN=0 LEFTMARGIN=0>

<form name=form1 method="post" action="" id=form1>
<INPUT type="hidden" id=txtlsh name=txtlsh value="<%=qlsh%>">
<INPUT type="hidden" id=txtmzh name=txtmzh value="<%=mzh%>">
<INPUT type="hidden" id=txtsyff name=txtsyff value="<%=syff%>">

<INPUT type="hidden" id=txtcfid name=txtcfid >
<INPUT type="hidden" id=txtczzt name=txtczzt >
<INPUT type="hidden" id=txtps name=txtps >

	<TABLE BORDER=1 CELLSPACING=0 CELLPADDING=0 bordercolorlight=#000000 bordercolordark=#ffffff style="HEIGHT: 20px; WIDTH: 100%">
		<TR  bgcolor="<%=trBGCOLOR%>" bordercolorlight='#000000' bordercolordark='#ffffff' >
			<TD align=middle colspan=2><font color="<%=tableHFONTCOLOR%>">药品</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">数量</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">皮试</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">次数量</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">日数量</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">天数</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">用法</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">单价</font></TD>
			<TD align=middle><font color="<%=tableHFONTCOLOR%>">金额</font></TD>
		</TR>
<%

			dim arr(10)

			for i=0 to 10
				arr(i)=0
			next
			fz=0
			j=0
			i=0
			je=0 
			sqlstr="SELECT a.RZKS, a.XMLX, a.CFID, a.CSL, a.TS, a.DJ, a.SL, a.JE, a.CFZT, a.LSH, c.YPSPM,b.SYFFMC, e.PSMC, c.GG, b.SYFFID, a.PS, a.FZ , d.RCSMC AS rcs, f.dwmc as ggdw, a.YSZT  " 
			sqlstr=sqlstr&" FROM YK_tSYFF b INNER JOIN  MZ_tCFLR a ON b.SYFFID = a.SYFF INNER JOIN YK_tYPBM c ON a.BH = c.YPID INNER JOIN yk_typdw f on f.dwid=c.dw2 INNER JOIN GGZD_tRCS d ON"
			sqlstr=sqlstr&"  a.RCS = d.RCSID LEFT OUTER JOIN  GGZD_tPS e ON a.PS = e.PSID  where  a.lsh='" & qlsh & "'  and (syffid in ("&syff&") or a.xmlx=0)  and a.sl-a.ytsl>0 ORDER BY a.fz desc,a.xmlx,LSH"  'v_ykbrzssmx
			

			rs.Open sqlstr,conn,3,1

			
				do while not RS.eof
					Response.Write "<tr  bordercolorlight='#000000' bordercolordark='#ffffff' id='tr"&rs("cfid")&"' name='tr"&rs("cfid")&"'>"
					Response.Write "<td nowrap align=left><INPUT type=checkbox id=chk  name=chk value='" & RS("cfid") &"'>"
		
					Response.Write  RS("ypspm") & "[" & RS("gg") & "]" & "</td>"	
					
					if cint(fz)<> cint(rs("fz"))  then
						if  cint(fz)>0 then 
							arr(i)=j&"a"&fz
							i=cint(i)+1
						end if
						j=0
						fz=0
						' Response.Write "kkk"
					else
						j=cint(j)+1	
					end if
										 
					if cint(rs("fz"))=0 then
					Response.Write "</td><td width=15px  >&nbsp;</td>"
					else	 
					Response.Write "</td><td  id='td"&j&"a"&rs("fz")&"' name='td"&j&"a"&rs("fz")&"' width=15px  >&nbsp;</td>"&chr(13)
					end if
								     
					fz=cint(rs("fz"))
			
			
					Response.Write "<td nowrap align=right>"&RS("sl")&"</td>"	
					if RS("psmc")="+" then
						Response.Write "<td nowrap align=center><font color=red>("&RS("psmc")&")</td>"	
					else
						if RS("psmc")="-" then 
							Response.Write "<td nowrap align=center>("&RS("psmc")&")</td>"
						else
							Response.Write "<td nowrap align=center>"&RS("psmc")&"&nbsp;</td>"
						end if	
					end if
					Response.Write "<td nowrap align=center>"&RS("csl") & RS("ggdw") & "</td>"	
					Response.Write "<td nowrap align=center>"&RS("rcs") &"</td>"	
					Response.Write "<td nowrap align=center>"&RS("ts")&"</td>"	
					Response.Write "<td nowrap align=center>"&RS("syffmc")&"</td>"	
					'Response.Write "<td nowrap align=center>"&RS("yszt")&"&nbsp;</td>"	
					Response.Write "<td nowrap align=right>"&formatnumber(RS("dj"),2,-1)&"</td>"	
					Response.Write "<td nowrap align=right>"&formatnumber(RS("je"),2,-1)&"</td>"	
					RS.movenext
				
				loop							
		      rs.Close 
		      
		      
			if  cint(fz)>0 then 
				arr(i)=j&"a"&fz
				i=cint(i)+1
			end if
	

%>
</table>

</form>
</BODY>

<SCRIPT LANGUAGE=javascript>
<!--

var str,k;
  <% for j=0 to i%>
     str='<%=arr(j)%>';
     str=str.split('a');
     if(str.length>1)
     {
        for(k=0;k<=str[0];k++)
        {
           
           if(document.getElementById('td'+k+'a'+str[1])!=null)
           {
               if(k==0)
			   {
					document.getElementById('td'+k+'a'+str[1]).innerHTML='<font color=red>┓</font>';
					document.getElementById('td'+k+'a'+str[1]).style.borderBottom=0;
				}
               else if(k==str[0])
			   {
			    	document.getElementById('td'+k+'a'+str[1]).innerHTML='<font color=red>┛</font>';
			    	document.getElementById('td'+k+'a'+str[1]).style.borderTop=0;
			   }
               else
			   {
			    	document.getElementById('td'+k+'a'+str[1]).innerHTML='<font color=red>┃</font>';
			    	document.getElementById('td'+k+'a'+str[1]).style.borderBottom=0;
			    	document.getElementById('td'+k+'a'+str[1]).style.borderTop=0;
			    }
               
           }
        }
     }
  
  <%next%>
  

//-->
</SCRIPT>
</HTML>
<%
set rs=nothing
conn.close
set conn=nothing
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?