📄 axmmbmx.asp
字号:
<%@ Language=VBScript %>
<!-- #INCLUDE FILE="../../share\connectdb.asp" -->
<!--#include file=../../pubfunction.asp-->
<%
dim rs
set rs=server.CreateObject("adodb.recordset")
'应用
function funFromMb(lsh,mbid,nrid,sl,rzks,lrr,jsr)
if trim(lsh)="" or trim(mbid)="" or trim(nrid)="" or trim(sl)="" or trim(rzks)="" or trim(lrr)="" or trim(jsr)="" then
exit function
end if
dim comm2
set comm2=server.CreateObject("adodb.command")
comm2.ActiveConnection=conn
comm2.CommandType=4
comm2.CommandText="proc_MBCF_JS"
comm2.Parameters("@lsh")=lsh
comm2.Parameters("@mbid")=mbid
comm2.Parameters("@nrid")=nrid
comm2.Parameters("@sl")=sl
comm2.Parameters("@rzks")=rzks
comm2.Parameters("@lrr")=lrr
comm2.Parameters("@jsr")=jsr
comm2.Execute
set comm2=nothing
' Response.Write lsh&",mbid="&mbid&",nrid="&nrid&",sl="&sl&",rzks="&rzks&",lrr="&lrr&",jsr="&jsr
end function
function funExecTZ(mbid,vnrid)
'-----CREATE PROCEDURE proc_MBTZ
'--模板同组
'@mbid int,
'@vnrid varchar(1000)
if trim(vnrid)="" or trim(mbid)="" then
funExecTZ=1
exit function
end if
dim comm2
set comm2=server.CreateObject("adodb.command")
comm2.ActiveConnection=conn
comm2.CommandType=4
comm2.CommandText="proc_MBTZ"
comm2.Parameters("@mbid")=mbid
comm2.Parameters("@vnrid")=vnrid
comm2.Execute
funExecTZ=0
set comm2=nothing
end function
'增加
if Request.Form("hdPD")="ZJ" then
ssql = "INSERT INTO ggzd_tyzcfmbnr (mbid,xmlx,bh,csl,ts,syff,ps,sl,rcs,yszt,nrdh) VALUES("
ssql=ssql&Request.Form("hdmbid")&","&Request.Form("hdlxid")&",'"&Request.Form("hdbh")&"',"
ssql=ssql&Request.Form("hdcsl")&","&Request.Form("hdts")&","&Request.Form("hdsyff")&",0,"
ssql=ssql&Request.Form("hdsl")&","&Request.Form("hdrcs")&",'"&Request.Form("hdyszt")&"','"&Request.Form("hdnrdh")&"')"
' Response.Write ssql
conn.Execute ssql
end if
'删除
dim nrid
if Request.Form("hdPD")="SC" then
nrid="0"
for each intNRID in Request.Form("chk")
if isnumeric(intNRID) then
nrid=nrid&","&intNRID
end if
next
if len(nrid)>1 then
conn.Execute "delete ggzd_tyzcfmbnr where nrid in(" & nrid&")"
end if
end if
if Request.Form("hdPD")="TZ" and trim(Request.Form("hdmbid"))<>"" then
nrid="0"
for each intNRID in Request.Form("chk")
if isnumeric(intNRID) then
nrid=nrid&","&intNRID
end if
next
if len(nrid)>1 then
funExecTZ Request.Form("hdmbid"),nrid
end if
end if
'修改
if Request.Form("hdPD")="XG" then
sql="update ggzd_tyzcfmbnr set xmlx="&Request.Form("hdlxid")&",bh="&Request.Form("hdbh")&",csl="&Request.Form("hdcsl")
sql=sql&",rcs="&Request.Form("hdrcs")&",ts="&Request.Form("hdts")&",syff="&Request.Form("hdsyff")&",yszt='"&Request.Form("hdyszt")&"'"
sql=sql&",sl="&Request.Form("hdsl")&",nrdh='"&Request.Form("hdnrdh")&"'"
sql=sql&" where nrid="&Request.Form("hdmbnrid")
conn.Execute sql
end if
'应用
dim intRZKS,vjg,nrje,zhye
vjg="0"
nrje=0
zhye=0
zhye=Request.Form("hdye")
if trim(zhye)="" then zhye=0
if Request.Form("hdPD")="app" then
'--------------------------
'-----------------------
for each intNRID in Request.Form("chk")
if isnumeric(intNRID) then
vjg=vjg&","&intNRID
end if
next
sql="select sum(sl*dj) as je from ggzd_tyzcfmbnr,ggzd_txmbm where ggzd_tyzcfmbnr.bh=ggzd_txmbm.xmid "
sql=sql&" and ggzd_tyzcfmbnr.xmlx>3 and nrid in("&vjg&")"
nrje=0
rs.Open sql,conn,3,1
if rs.RecordCount>0 then
nrje=rs("je")
end if
rs.Close
if cdbl(nrje)<=0 then vjg=""
if cdbl(zhye)<=0 then vjg=""
if cdbl(nrje)>cdbl(zhye) then
Response.Write "<script language=vbscript>"&chr(10)
Response.Write "msgbox""余额不够,相差["&cdbl(nrje)-cdbl(zhye)&"元],请交款后再做"",64,""提示"""&chr(10)
Response.Write "</script>"
vjg=""
end if
' Response.Write vjg
if len(vjg)>1 then
'lsh,mbid,nrid,sl,rzks,lrr
funFromMb Request.Form("hdLSH"),Request.Form("hdmbid"),vjg, 1,session("rzks"),session("yhid"),session("yhid")
end if
end if
sql= "select * from VIEW_MBXM where mbid=" & Request("hdmbid") & " and (rzks=0 or rzks="&session("rzks")&") order by nrdh"
rs.open sql,conn,3,1
imbfs=Request("mbfs")
%>
<HTML>
<HEAD>
<SCRIPT LANGUAGE=javascript>
<!--
function mouseon(src,clrOver){
src.style.cursor = 'hand';
src.bgColor = clrOver;
}
function mouseout(src,clrIn) {
src.style.cursor = 'default';
src.bgColor = clrIn;
}
//nrid,bh,ypspm,dj,xmlx,SL,JE,YSZT,nrdh
function clickXM(nrid,xmid,xmmc,dj,xmlxid,SL,JE,YSZT,nrdh) {//非药品字典
parent.form1.iCFID.value=nrid;
parent.form1.txtSFXM.value=xmmc;
parent.form1.iBH.value =xmid;
parent.form1.iXMLX.value =xmlxid;
parent.form1.iDJ.value =dj;
// parent.form1.iSFLX.value =djcdy;
// parent.form1.iRZKS.value =rzks;
parent.form1.txtSFDJ.value =dj;
parent.form1.txtSFSL.value =SL;
parent.form1.txtSFJE.value =JE;
parent.form1.txtNRDH.value =nrdh;
parent.form1.txtSFSL.focus ();
}
//-->
</SCRIPT><META name="VI60_DefaultClientScript" Content="VBScript"><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 id=form1 name=form1 action="" method="post">
<INPUT type="hidden" id=hdPD name=hdPD>
<INPUT type="hidden" id=hdmbid name=hdmbid>
<INPUT type="hidden" id=hdlxid name=hdlxid>
<INPUT type="hidden" id=hdbh name=hdbh>
<INPUT type="hidden" id=hdfzmc name=hdfzmc>
<INPUT type="hidden" id=hdcsl name=hdcsl>
<INPUT type="hidden" id=hdrcs name=hdrcs>
<INPUT type="hidden" id=hdts name=hdts>
<INPUT type="hidden" id=hdsyff name=hdsyff>
<INPUT type="hidden" id=hdps name=hdps>
<INPUT type="hidden" id=hdsl name=hdsl>
<INPUT type="hidden" id=hddj name=hddj>
<INPUT type="hidden" id=hdje name=hdje>
<INPUT type="hidden" id=hdrzks name=hdrzks>
<INPUT type="hidden" id=hdyszt name=hdyszt>
<INPUT type="hidden" id=hdnrdh name=hdnrdh>
<INPUT type="hidden" id=hdye name=hdye>
<!--以下的hidden应用于'模板应用'时使用-->
<INPUT type="hidden" id=hdYZLX name=hdYZLX><!--医嘱类型-->
<INPUT type="hidden" id=hdLSH name=hdLSH><!--流水号-->
<INPUT type="hidden" id=hdKZYS name=hdKZYS><!--开嘱医生-->
<INPUT type="hidden" id=hdmbnrid name=hdmbnrid>
<INPUT type="hidden" id=mbfs name=mbfs value="<%=imbfs%>">
<table border="1" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="1" cellspacing="0" width="560" align="left">
<tr bgcolor="<%=trBGCOLOR%>">
<td width=20> <INPUT type="checkbox" id=chk name=chk value=-1 style="width:0;height:0">
<INPUT type="checkbox" id=chk name=chk value=-2 style="width:0;height:0"></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">项目名称</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">数量</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">单价</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">金额</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">类型</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">备注</font></td>
<td align=middle nowrap><font color="<%=tableHFONTCOLOR%>">序号</font></td>
</tr>
<%do while not rs.EOF
if trim(imbfs)="dk" then
Response.Write "<tr bgcolor='"&rs("bgcolor")&"'>"
else
' nrid,bh,ypspm,dj,xmlx,SL,JE,YSZT,nrdh
Response.Write "<tr bgcolor='"&rs("bgcolor")&"' onclick=javascript:clickXM('"& rs("nrid")&"','"&RS("bh")&"','"&RS("ypspm")&"','"&RS("dj")&"','"&RS("xmlx")&"','"&RS("SL")&"','"&RS("JE")&"','"&RS("YSZT")&"','"&rs("nrdh")&"') onmouseout=javascript:mouseout(this,'"&rs("bgcolor")&"') onmouseover=javascript:mouseon(this,'#E0E0CA')>"
end if
%>
<td width=20><INPUT type="checkbox" id=chk name=chk value=<%=rs("nrid")%> style="width:20;height:15"></td>
<td nowrap><%=rs("ypspm")%></td>
<td nowrap><%=rs("sl")&"/"&rs("dwmc")%></td>
<td nowrap align=right><%=formatnumber(cdbl(rs("dj")),2,-1)%></td>
<td nowrap align=right><%=formatnumber(cdbl(rs("je")),2,-1)%></td>
<td nowrap align=left><%=rs("lbmc")&rs("zfblms")%></td>
<td nowrap align=left><%=rs("bz")%> </td>
<td nowrap align=left><%=rs("nrdh")%> </td>
</tr>
<%rs.MoveNext%>
<%loop%>
</table>
</form>
<%if strZT="CG" then%>
<SCRIPT LANGUAGE=vbscript>
<!--
' msgbox "应用模板成功,如不需再应用,请按“返回”按钮返回!",vbinfomation,"提示"
-->
</SCRIPT>
<%end if%>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -