amzxmwjsmx.asp

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

ASP
313
字号
<%@ Language=VBScript %>
<!-- #INCLUDE FILE="../../share\connectdb.asp" -->
<!--#include file=../../pubfunction.asp-->
<%
dim rs, ips,itxtsjss,zdmc,mzh,sql

	qlsh=""
	qghsj=""
	qys=""
	qye=0
	qqf=""
	ixmfy=""
	izyfy=""
	iQFJE=""
	ips=""
	sflxmc=""

	 qlsh=Request.Form("txtLSH")
	 if trim(qlsh)="" then  qlsh=Request.QueryString("lsh")
	 
	 if trim(qlsh)="" then qlsh=0
	 
	 mzh=Request.QueryString("mzh")

	 '显示医生
	 dim syje,ybsyje,HZYLSYJE
	 
	syje=0
	YBSYJE=0
	HZYLSYJE=0
     set rs=server.CreateObject("adodb.recordset")
     
   
	if Request.Form("pdid")="SC"  then
	    if cint(Request("txtlx"))=0 then 
			sql="delete mz_tcflr where cfzt=0 and lrr="&session("yhid")&" and cfid="&Request("text")&" and lsh="&qlsh 
		elseif cint(Request("txtlx"))=1 then 
			sql="delete mz_tcflr_xm where cfzt=0 and lrr="&session("yhid")&" and cfid="&Request("text")&" and lsh="&qlsh 
		else
			sql="delete mz_tcflr_cl where cfzt=0 and lrr="&session("yhid")&" and cfid="&Request("text")&" and lsh="&qlsh 
		end if
		conn.execute sql
	end if
	
	if Request.Form("pdid")="JS"  then  '有参数则修改处方状态+2 
		
			dim yp,cl,xm,QFJE
			
			yp=Request.Form("txtyp")
			cl=Request.Form("txtcl")
			xm=Request.Form("txtxm")
			if trim(yp)="" then yp="0"
			if trim(cl)="" then cl="0"
			if trim(xm)="" then xm="0"
			QFJE=0
			if trim(yp)<>"0" then 
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr a where cfid in ( " &yp& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if trim(cl)<>"0" then 
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr_cl a where cfid in ( " &cl& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if trim(xm)<>"0" then 
				rs.Open "select isnull(sum(a.je-a.ytje),0) as cfje from mz_tcflr_xm a where cfid in ( " &xm& ") and cfzt in (0,1) ",conn,3,1
				if rs.RecordCount>0 then QFJE=cdbl(QFJE)+cdbl(RS("cfje"))
				rs.Close 
			end if
			
			if cdbl(QFJE)>0 then
			    if trim(yp)<>"0" then 
			        funmzyffy  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),yp
			    end if
			    if trim(cl)<>"0" then 
			        funmzyfcl  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),cl
			    end if
			    if trim(xm)<>"0" then
			        funmzxmjs  qlsh,session("rzks"),session("yhid"),session("yhid"),session("yhid"),session("yhid"),xm
			    end if
			end if
				
		end if
		
		
	function funmzyffy(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzyffy"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzyffy=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
	function funmzyfcl(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzclfcl"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzyfcl=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
	function funmzxmjs(lsh,rzks,fyr,tpr,tpfhr,cfshr,vcfid)
		set comm=server.CreateObject("adodb.command")
		comm.ActiveConnection=conn
		comm.CommandType=4
		'Response.Write lsh&","&rzks&","&fyr&","&tpr&","&tpfhr&","&cfshr
		comm.CommandText="proc_mzxmjs"
		comm.Parameters("@intLSH")=lsh
		comm.Parameters("@intRZKS")=rzks
		comm.Parameters("@intfyr")=fyr
		comm.Parameters("@inttpr")=tpr
		comm.Parameters("@inttpfhr")=tpfhr
		comm.Parameters("@intcfshr")=cfshr
		comm.Parameters("@vcfid")=vcfid
		
		comm.Parameters("@jsid")=0
		comm.Execute 
		funmzxmjs=comm.Parameters("@jsid")' comm("jg").Value 
		set comm=nothing
	end function
	
%>
<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" >

<SCRIPT LANGUAGE=javascript>
<!--
function selectAll(zid)
 {
     var obj,i;
    obj=document.all.item('chk');
    if(obj==null) return;
    if(obj.length==null)
    {
       if (obj.name=='chk'+zid)
          obj.checked=true;
       return;
    } 
    for(i=0;i<obj.length;i++)
    {
      if(obj(i)!=null)
      {
         if (obj(i).name=='chk'+zid)
			obj(i).checked=true;
      }
    }
 }
function funallsel()
{ 
    var obj,i;
    obj=document.all.item('chk');
    if(obj==null) return;
    if(obj.length==null)
    {
       obj.checked=true;
       return;
    } 
    for(i=0;i<obj.length;i++)
    {
      if(obj(i)!=null)
         obj(i).checked=true;
    }

}

function funsccf(cfid,lx)
{
	if(window.confirm('确定要删除该处方吗?')==false) return;
	form1.text.value=cfid;
	form1.pdid.value="SC";
	form1.txtlx.value=lx;
	form1.submit();
	//if request("hdPD")="TZ" then	
}

//-->
</SCRIPT>


</HEAD>
<BODY topmargin=0 leftmargin=0>
<FORM action="" method=POST id=form1 name=form1> <INPUT type="hidden" id=pdid name=pdid>
 <INPUT type="hidden" id=txtlsh name=txtlsh value="<%=qlsh%>">
<INPUT type="hidden" id=text name=text>
<INPUT type="hidden" id=txtyp name=txtyp >
<INPUT type="hidden" id=txtcl name=txtcl >
<INPUT type="hidden" id=txtxm name=txtxm >
<INPUT type="hidden" id=txtlx name=txtlx >
<table border="1"  bordercolorlight=#000000 bordercolordark=#ffffff cellPadding="0" cellSpacing="0" style="HEIGHT: 22px; WIDTH: 100%">
<tr  bgcolor="<%=trBGCOLOR%>" height=25px  bordercolorlight=#000000 bordercolordark=#ffffff >
  <td nowrap align="middle" nowrap style='cursor:hand' LANGUAGE=javascript onclick=funallsel()>
<font color=blue>全选</font>&nbsp;&nbsp;&nbsp;<font color="<%=tableHFONTCOLOR%>">项目名称</font></td>
<td nowrap align="middle" ><font color="<%=tableHFONTCOLOR%>">单位</font></td>
<td nowrap align="middle"><font color="<%=tableHFONTCOLOR%>">数量</font></td>
<td nowrap align="middle"><font color="<%=tableHFONTCOLOR%>">单价</font></td>
<td nowrap align="middle"><font color="<%=tableHFONTCOLOR%>">金额</font></td>
<td nowrap align="middle" colspan=2><font color="<%=tableHFONTCOLOR%>">备注</font></td></tr>
<%
		i=0
		dim je
		je=0
		sqlstr="select cfzt, cfid,xmmc,dw,sl,dj,je,bz,lsh,xmlx,rzks, zid,zmc,lx  from view_mzxmwjsmx  where lsh='" & qlsh & "'  AND  rzks='" & session("rzks") & "' order by zid desc,cfid"
		'Response.Write sqlstr
		dim zid,bgcolor
		rs.Open sqlstr,conn,3,1
		bgcolor="#ffefd5"
		
		
		do while not RS.eof
			if clng(rs("zid"))<>-1 then'--有分组项目
				if clng(ai)>clng(maxi) then maxi=ai
				if trim(zid)<>trim(rs("zid")) then
					if clng(j) mod 2=0 then 
						bgcolor="#6495ed"
					else
						bgcolor="#3cb371"
					end if
						Response.Write "<tr bordercolorlight='#000000'  bordercolordark='#ffffff'  bgcolor='"&bgcolor&"' >"
						Response.Write "<Td colspan=6 style='cursor:hand' onclick=javascript:selectAll('"&rs("zid")&"')>"
						Response.Write "<font color=black><b>*"&rs("zmc")&"↓↓</b></font></td></tr>"
					   ai=0
					j=clng(j)+1				 
				end if
				zid=trim(rs("zid"))      
				Response.Write "<TR bgcolor='"&bgcolor&"'><TD nowrap><INPUT type=checkbox id=chk name='chk"&rs("zid")&"'  title='"&rs("lx")&"'	value="	& rs("CFID") & ">" 
				Response.Write  rs("XMMC") 			    	
				Response.Write "</td><td ALIGN=RIGHT nowrap>"
				Response.Write rs("SL")
				Response.Write "</td><td nowrap>"
				Response.Write rs("dw")
				Response.Write "</td><td  align=right nowrap>"
				Response.Write formatnumber(rs("DJ"),2,-1)  
				Response.Write "</td><td align=right nowrap>"
				Response.Write formatnumber(rs("JE"),2,-1)&"</td><td >"
				Response.Write rs("bz")&"&nbsp;</td>"
				if cint(rs("cfzt"))=0 then 
				   Response.Write "<TD width=16 LANGUAGE=javascript  style='cursor:hand'  onclick=funsccf('"&rs("cfid")&"','"&rs("lx")&"') title='删除'><font color=red ><b>×</b></font></TD></tr>"
				else
				   Response.Write "<TD width=16 >&nbsp;</TD></tr>"

				end if
				 
				
			else '--无分组项目
				Response.Write "<tr><td nowrap ><INPUT type=checkbox id=chk  name=chk  value=" & RS("cfid") & " title='"&rs("lx")&"'>"
				Response.Write RS("xmmc")&"</td><td   align=center  nowrap>"
				Response.Write RS("dw")&"</td><td  align=right  nowrap>"
				Response.Write RS("sl")& "</td><td  align=right  nowrap>"
				Response.Write formatnumber(RS("dj"),2,-1)&"</td><td  align=right  nowrap>"
				Response.Write formatnumber(rs("JE"),2,-1)&"</td><td >"
				Response.Write rs("bz")&"&nbsp;</td>"
				if cint(rs("cfzt"))=0 then 
				   Response.Write "<TD width=16 LANGUAGE=javascript  style='cursor:hand'  onclick=funsccf('"&rs("cfid")&"','"&rs("lx")&"') title='删除'><font color=red ><b>×</b></font></TD></tr>"
				else
				   Response.Write "<TD width=16 >&nbsp;</TD></tr>"

				end if
			end if
			if cint(rs("cfzt"))=0 then je=cdbl(je)+cdbl(rs("je"))
			RS.movenext
			
							
		loop
		
		rs.close  
    %>
</table></form>
</BODY>
</HTML>
<%
set rs=nothing
conn.Close 
set conn=nothing
%>
<SCRIPT LANGUAGE=javascript>
<!--
 if(parent.document.getElementById("txtcfje")!=null)
    parent.document.getElementById("txtcfje").value='<%=je%>';
//-->
</SCRIPT>

⌨️ 快捷键说明

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