📄 amztxmzfdk.asp
字号:
<% if session("yhid")="" then Response.Redirect "../adl.asp"
set conn=server.CreateObject ("adodb.connection")
conn.Open application("sconn")
set rs=server.CreateObject ("adodb.recordset")
%>
<HTML>
<HEAD>
<META name=VI60_defaultClientScript content=VBScript>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--
Sub txtmzh_onkeypress
if window.event.keyCode =13 and form1.txtmzh.value<>"" then
'form1.txtmzh.value =right("00000000"&form1.txtmzh.value,8)
form1.submit
end if
End Sub
Sub cmddk_onclick
dim fso,ts,comx
Set FSO = CreateObject("Scripting.FileSystemObject")
if fso.FileExists("c:\comx.txt") then
Set ts = fso.OpenTextFile("c:\comx.txt", 1)
comx=cint(right(ts.readline,1))-1
set ts=nothing
set fso=nothing
else
msgbox "请先设置读卡器!",48,"提示"
exit sub
end if
if YhCARD1.ICKinit(comx,9600)<0 then
msgbox "初始化串口失败!",vbinformation,"提示"
exit sub
end if
dim state
state=YhCARD1.ICKstatus()
if state<0 then
msgbox "初始化卡机出错,请检查卡机是否已和串口1连接并且电源已打开",vbinformation,"提示"
YhCARD1.ICKexit
exit sub
else
if state=0 then
msgbox "卡机没有插入IC卡或IC卡没有插紧!",vbinformation,"提示"
YhCARD1.ICKexit
exit sub
end if
end if
strKH=dkh("<%=yyxx()%>")
if strKH="DKC" then
msgbox "该卡不是本医院使用的IC卡,或者未被初始化!",vbinformation,"提示"
YhCARD1.ICKexit
exit sub
end if
YhCARD1.ICKbeep 30
YhCARD1.ICKexit
form1.txtKH.value = strKH
form1.hdPD.value ="DK"
form1.submit
End Sub
Sub cmbghsj_onchange
form1.hdPD.value ="ghsj"
form1.submit
End Sub
-->
</SCRIPT>
<!--#include file=../../ggmk.asp-->
<script type="text/vbscript" src="../../ggmk.vbs"></script>
<style>
<!--
table
{
FONT-FAMILY:宋体;
FONT-SIZE: 10pt
}
INPUT
{
FONT-FAMILY:宋体;
FONT-SIZE: 9pt
}
SELECT
{
FONT-FAMILY:宋体;
FONT-SIZE: 9pt
}
-->
</style>
<OBJECT classid="clsid:BE1D0588-3F5B-11D4-BA7E-00A0C99CA6DE" height=14 id=YhCARD1 style="HEIGHT: 14px; LEFT: 0px; TOP: 0px; WIDTH: 100px"
width=100>
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="_ExtentX" VALUE="2646">
<PARAM NAME="_ExtentY" VALUE="370">
<PARAM NAME="_StockProps" VALUE="0"></OBJECT>
</HEAD>
<BODY leftmargin=0 topmargin=0 bgcolor=#cce8d6>
<FORM action="" method=POST id=form1 name=form1><INPUT type="hidden" id=hdPD name=hdPD>
<INPUT type="hidden" id=txtkh name=txtkh>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=100% >
<TR>
<TD>门诊号</TD>
<TD>
<INPUT id=txtmzh name=txtmzh style="WIDTH: 80px" readonly>
</TD>
<TD align=center> 姓名</TD>
<TD><INPUT id=txtXM name=txtXM
style="BACKGROUND-COLOR: #cce8d6; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; COLOR: mediumblue; FONT-VARIANT: normal;
FONT-WEIGHT: bold;
HEIGHT:
18px;
WIDTH:
75px"
readonly
></TD>
<TD>
性别</TD>
<TD><INPUT id=txtXB name=txtXB
style="BACKGROUND-COLOR: #cce8d6; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; COLOR: mediumblue; FONT-VARIANT: normal; FONT-WEIGHT: bold;
WIDTH:
20px"
readonly ></TD>
<TD>
年龄</TD>
<TD><INPUT id=txtS name=txtS
style="BACKGROUND-COLOR: #cce8d6; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; COLOR: mediumblue; FONT-VARIANT: normal; FONT-WEIGHT: bold;
WIDTH:
30px"
readonly
></TD>
<TD>岁</TD>
<TD><INPUT id=txtY name=txtY
style="BACKGROUND-COLOR: #cce8d6; BORDER-LEFT-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-TOP-STYLE: none; COLOR: mediumblue; FONT-VARIANT: normal; FONT-WEIGHT: bold;
WIDTH:
24px"
readonly
></TD>
<TD>月</TD><td >
<SELECT id=cmbghsj name=cmbghsj style="width:106"> <option selected value=-1>请选择挂号时间</option> <% if trim(Request("txtmzh"))<>"" or trim(Request("txtkh")) <>"" then
dim intkzt
intkzt=kzt(Request.Form("txtkh"))
if intkzt=1 or intkzt=2 then
Response.Write "<script language=vbscript>"&chr(10)
Response.Write "msgbox ""该卡己不能正常使用!可能己挂失或作废"""&chr(10)
Response.Write "</script>"&chr(10)
else
if trim(Request("txtkh")) <>"" then
sql="select x.blh, r.mzh,x.xm,x.xb,x.csrq from mz_tbr r,mz_tbrxx x ,ggzd_tk k where r.blh=x.blh and k.blh=r.blh and k.kdh='"&trim(Request("txtkh"))&"'"
else
sql= "select x.blh, s.ghsj, r.mzh,x.xm,x.xb,x.csrq from mz_tbr r,mz_tbrxx x ,mz_tbrls s where r.blh=x.blh and r.mzh='"&trim(Request("txtmzh"))&"'"
end if
rs.Open sql,conn
if rs.EOF and rs.BOF then
Response.Write "<script language=vbscript>"&chr(10) Response.Write "msgbox ""该卡未出售!""" & chr(10) Response.Write "</script>"&chr(10)
else strblh=rs("blh") Response.Write "<script language=vbscript>"&chr(10)
response.Write "form1.cmbghsj.value="""&request("cmbghsj")&""""&chr(10)
response.Write "form1.txtmzh.value="""&rs("mzh")&""""&chr(10)
Response.Write "form1.txtxm.value="""&rs("xm")&""""&chr(10)
Response.Write "form1.txtxb.value="""&rs("xb")&""""&chr(10)
If Month(date()) < Month(rs("csrq")) Then
Response.Write "form1.txts.value= """ & Year(date()) - Year(rs("csrq") ) - 1 &"""" &chr(10)
Else
Response.Write "form1.txts.value="""& Year(date()) - Year(rs("csrq")) &"""" &chr(10)
End If
Response.Write "form1.txty.value ="""& (Month(date()) - Month(rs("csrq") ) + 12) Mod 12 &"""" &chr(10)
Response.write "</script>" rs.Close
rs.Open "select s.ghsj,s.lsh from mz_tbrls s where blh="&strblh &" order by s.lsh desc" while not rs.EOF
Response.Write "<OPTION value="&rs("lsh")&">" Response.Write rs("ghsj") Response.Write "</option>"
rs.MoveNext
wend rs.Close
end if end if
end if %>
</SELECT>
<INPUT type="button" value="读 卡" id=cmddk name=cmddk style="width:60"></td>
</TR>
</table>
</FORM>
</BODY>
</HTML>
<%
if trim(Request("hdPD"))="ghsj" then
strlsh=request("cmbghsj")
Response.Write "<script language=vbscript>"&chr(10)
rs.Open "select g.xm as ysxm from mz_tbrls s ,ggzd_tgzry g where g.ryid=s.ys and s.lsh="&strlsh,conn
if not (rs.EOF and rs.BOF) then
Response.Write "parent.form1.txtys.value="""&rs("ysxm")&""""&chr(10)
Response.Write "form1.cmbghsj.value="""&request("cmbghsj")&""""&chr(10)
end if
' Response.Write "window.parent.upmenu.form1.txtlsh.value="""&request("cmbghsj")&""""&chr(10)
Response.Write "window.parent.frazjh.form1.txtlsh.value="""&request("cmbghsj")&""""&chr(10)
Response.Write "window.parent.frazjh.form1.submit"&chr(10)
'Response.Write "window.parent.upmenu.form1.submit"&chr(10)
Response.Write "</script>"
rs.Close
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -