<!-- #include file="../conn.asp" -->
<!-- #include file="../const.asp" -->
<%
sExport=requestA("export")
if sExport="" then
%>
<!-- #include file="../jq.html" -->
<title><%=dianming%> - 数据汇总</title>
<link href="../images/sunzom.css" rel="stylesheet" type="text/css">
<%
end if
call chksunzom()
pxu=requestA("px")
dybt=requestA("dybt")
soye=chk0(requestA("soye"))
yjday=chk0(requestA("yjday"))
yuok=chk0(requestA("yuok"))
if soye=1 then maxrecord=10000
if soye>1 then maxrecord=soye
mxid=requestA("mxid")
m1id=requestA("m1id")
xxid=chk0(requestA("xxid"))
x1id=chk0(requestA("x1id"))
cdid=chk0(requestA("cdid"))
if cdid=202 or cdid=204 then xqnl="结算单" else  xqnl="详情" 
bhao=0
if chk0(x1id)>0 then x00id=x1id else  x00id=xxid
if chk0(m1id)>0 then m0id=m1id else  m0id=mxid

sid=chk0(requestA("sid"))
sids=split(""&sid&"|0|0|0|0|0|","|")
sid0=chk0(sids(0)):sid1=chk0(sids(1)):sid2=chk0(sids(2)):sid3=chk0(sids(3)):sid4=chk0(sids(4)):sid5=chk0(sids(5))
if len(sid2)<3 then sid2="h0ui"
gid=chk0(requestA("gid"))

sql="select * from sz_mx where id="&mxid&""  
set rs1 =server.createobject("ADODB.RecordSet")	
rs1.open sql,conn,1,3
if not rs1.eof then
mxname=rs1("mxname"):mxml=rs1("mxml"):mxbiao=rs1("mxdat"):mxdat1=rs1("mxdat"):mxdat=Replace(rs1("mxdat"),""&bqz&"",""):xmname=rs1("xmname"):mxdw=rs1("mxdw")
mxms=rs1("mxms"):bbxian=rs1("bbxian"):bdys=chk0(rs1("bdys")):bid=chk0(rs1("bid")):bzd=rs1("bzd"):bbal=rs1("bbal"):glqx=rs1("glqx"):mxgs=rs1("mxgs"):smsmb=rs1("smsmb"):sms1mb=rs1("smsmb")
if instr(bbal,"yujing")>0 then isyujing=1
if instr(bbal,"smsdx")>0 then issmsok=1
if instr(bbal,"emaildx")>0 then isemail=1
end if
rs1.close:set rs1=nothing

If sExport = "excel" Then
	Response.ContentType = "application/vnd.ms-excel"
	Response.AddHeader "Content-Disposition", "attachment; filename="&mxname&".xls"
End If
If sExport = "word" Then
	Response.ContentType = "application/vnd.ms-word"
	Response.AddHeader "Content-Disposition:", "attachment; filename="&mxname&".doc"
End If
If sExport = "csv" Then
	Response.ContentType = "application/csv"
	Response.AddHeader "Content-Disposition:", "attachment; filename="&mxname&".csv"
End If
%> 

<%
'取得搜索关键字
soxs=chk0(requestA("soxs"))
nowstartdate=requestA("startdate") 
if len(nowstartdate)=""  then   nowstartdate=(date()-day(date()-1))&" 00:00:00"
nowenddate=request("enddate") 
if len(nowenddate)="" then  nowenddate=date()&" 23:59:59"
nowkeyword=requestA("keyword")
nowriqi=request("riqi")
nowkey2=request("key2")
if nowriqi<>"" and len(nowriqi)>3 then nowstartdate=nowriqi&" 00:00:00":nowenddate=nowriqi&" 23:59:59"
if nowstartdate<>"" and nowenddate<>"" then
if formatdatetime(nowstartdate,2)=formatdatetime(nowenddate,2) then nowriqi=formatdatetime(nowenddate,2)
if right(nowstartdate,2)<>"00" then nowstartdate=nowstartdate&" 00:00:00"
if right(nowenddate,2)<>"59" then nowenddate=nowenddate&" 23:59:59" 
end if
pgxx0="&startdate="&escape(nowstartdate)&"&enddate="&escape(nowenddate)&"&mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&cdid="&cdid&"&sid="&sid&"&soye="&soye&"&yjday="&yjday&"&yuok="&yuok&""


if sExport="" then
%><div id="layout"><div id="navTab" class="tabsPage">
<div class="pageHeader"><a href="javascript:history.back(-1)">
<img border="0" src="../images/back.gif" align="right"></a>
<span style="float: left"><form  method="POST" action="hz.asp?mxid=<%=mxid%>&m1id=<%=m1id%>&xxid=<%=xxid%>&sid=<%=sid%>" name="form5"><%=gdcd(mxid,xxid,2,sid0,"",m1id,m2id,cdid,x00id)%><%if len(gdcd(mxid,xxid,2,sid0,"",m1id,m2id,cdid,x00id))>5 then isljqk=1%><%sosuoxx()%>
</form></span><span style="float: right"><form name="form3"  style="float: right" method="POST" action="hz.asp?mxid=<%=mxid%>&m1id=<%=m1id%>&xxid=<%=xxid%>&sid=<%=sid%>"><%=userxuan(nowuser," onChange=""form3.submit()""","keyword","xuan")%></form></span>
</div><form name="form2" action="xx_del.asp"><div class="pageContent">
<div class="panelBar">
<ul class="toolBar">
<li><a class="icon" href="hz.asp?mxid=<%=mxid%>&m1id=<%=m1id%>&xxid=<%=xxid%>&sid=<%=sid%>"><span><%'=mxname%>汇总首页</span></a></li>
<%if instr(quanxs,"zmxj")>0 then%><li><a class="add" href="yw.asp?mxid=<%=mxid%>&m1id=<%=m1id%>&xxid=<%=xxid%>&sid=<%=sid%>" ><span>新增</span></a></li><%end if%>
<%if instr(allsx,"bbnocz")>0 and instr(quanxs,"smxc")>0 then%><input type='hidden' name="lx" size="1" value="hz" ><input type='hidden' name="dat" value="<%=mxbiao%>"><input type="submit" value="删 除" class="delete" onClick="return confirm('确定要删除所选择的记录吗？')"><%end if%>
<%if instr(mxgs,"+")>0 or  instr(mxgs,"-")>0 then%>&nbsp;&nbsp; &nbsp;&nbsp; <input onclick="location.href='mxgs.asp?id=<%=mxid%>&cid=<%=m1id%>'" value="执行模型公式计算"  type=button name="moren"><%end if%>
</ul>
<dl style="float: left">
<%if isyujing=1 then
temp1=temp1&"预提醒：<a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=1&yuok=1"">今天</a>"
temp1=temp1&"  <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=3&yuok=1"">三天内</a>"
temp1=temp1&"  <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=7&yuok=1"">一周内</a>"  
temp1=temp1&"  <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=30&yuok=1"">一月内</a>"
temp1=temp1&"  <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=90&yuok=1"">三月内</a>"
temp1=temp1&"  <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&nowkeyword&"&key2="&nowkey2&"&yjday=&yuok=1"">提醒全部</a>"
end if%>
<%
 sql="select * from SZ_zd where ChannelID="&mxid&" and ShowOnForm=1 and ShowOnUserForm<>1 and (FieldType=3 or FieldType=6 or FieldType=7) and instr(zdhz,'sxkey')>0 order by OrderID desc,id asc"
set rsc2=conn.execute(sql)
if not rsc2.bof then
do while not rsc2.eof
zdid4=rsc2("id"):bdTitle=rsc2("Title"):bdmoren1=rsc2("DefaultValue"):bd1ptions=replace(replace(rsc2("Options"),chr(10),""),chr(13),"[$]"):zdhz=rsc2("zdhz")

if instr(bdmoren1,"|")>0 then
bxs=split(bdmoren1,"|")
sqla="select * from "&bxs(0)&""
set rsc3=conn.execute(sqla)
if not rsc3.bof then
do while not rsc3.eof
sxname=rsc3(bxs(1))
temp1=temp1&" <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&sxname&""""
if rsc3(bxs(1))=nowkeyword then temp1=temp1&" class=""xzkey"" "
'Response.Write ""&sxname&"":Response.end
temp1=temp1&">"&sxname&"</a> "
rsc3.movenext
loop
end if
rsc3.close:set rsc3=nothing
else
if bd1ptions="" then bd1ptions="[$]"
baoxz=split(bd1ptions,"[$]")
for s=0 to Cntshu(bd1ptions,"[$]")
if instr(baoxz(s),"|")>0 then bdxxs=split(baoxz(s),"|"):bdxx1=bdxxs(0):bdxx2=bdxxs(1) else bdxx1=baoxz(s):bdxx2=baoxz(s)
temp1=temp1&" <a href=""hz.asp?mxid="&mxid&"&m1id="&m1id&"&xxid="&xxid&"&x1id="&x1id&"&sid="&sid&"&keyword="&bdxx2&""" "
if bdxx1=nowkeyword or bdxx2=nowkeyword then temp1=temp1&" class=""xzkey"" "
if instr(bdxx1,"选择")>0 then bdxx1=replace(bdxx1,bdxx1,"")
temp1=temp1&">"&bdxx2&"</a> "
next
end if

rsc2.movenext
loop
end if
rsc2.close:set rsc2=nothing
Response.Write "<dl class=""button1"">"&temp1&"</dl>"
%></dl></div>
<%
else
if len(dybt)>1 then dayinbt=dybt else dayinbt=""&gsname&"-"&mxname&""
Response.Write "<h2 align=""center"">"&dayinbt&"</h2>"
end if


if bid>0 and xxid>0 then
mxdat0=cdatx("mxdat","SZ_mx","where id="&bid&"")
gxname=cdatx("mxname","SZ_mx","where id="&bid&"")

sql="select * from SZ_zd where ChannelID="&bid&" and Instr('"&bzd&"',FieldName)>0 and ShowOnForm=1  and ShowOnUserForm<>1 order by OrderID desc,id asc"
set rsb2=conn.execute(sql)
if not rsb2.bof then
Response.Write "<div class=""f12 pd5"">"
do while not rsb2.eof
id2=chk0(rsb2("id"))
bdTitle=rsb2("Title"):bdname=rsb2("FieldName")
edx=cdatx(""&bdname&"",""&mxdat0&"","where id="&xxid&"")
Response.Write ""&bdTitle&"：<b>"&edx&"</b>&nbsp;&nbsp;"
rsb2.movenext
loop
Response.Write "</div>"
end if
rsb2.close:set rsb2=nothing
end if
%>
<%
sql="select * from SZ_zd where ChannelID="&mxid&" and ShowOnForm=1 and ShowOnUserForm<>1 order by OrderID desc,id asc"  'and zdbbxs=1 
set rsc2=conn.execute(sql)
if not rsc2.bof then
do while not rsc2.eof
zdid3=rsc2("id"):bdTitle=rsc2("Title"):bdname=rsc2("FieldName"):zdhz=rsc2("zdhz"):zdurl=rsc2("zdurl"):pbkey=rsc2("pbkey")
if instr(zdhz,"pai1xu")>0 then mopx=mopx&""&bdname&" desc,"
if instr(zdhz,"pai2xu")>0 then mopx=mopx&""&bdname&" asc,"
if instr(zdhz,"gluser")>0 then souser=souser&" or ("&bdname&" like '%"&nowuser&"%' or  "&bdname&" like '%"&nowuserhao&"%') "
if len(rsc2("pbkey"))>1 then sopbkey=sopbkey&" and instr("&bdname&",'"&rsc2("pbkey")&"')<=0 ":ispb=1

'if instr(bbal,"yuan")>0 and sid2="h0ui" then clac=" class=""nohang"""
if instr(bbal,"yuan")>0 then clac=" class=""nohang"""
if instr(zdhz,sid2)<=0 and instr("h0ui,h1ui,h2ui,h3ui,h4ui,h5ui,h6ui,h7ui,h8ui,h9ui,h10ui,h11ui,h12ui,h13ui,h14ui,h15ui",sid2)>0 then

hzbt=hzbt&"<th "&clac&">"
if nowuserid=1 and sExport="" then
hzbt=hzbt&"<a target=""_blank"" href=""zdgl.asp?chk=edit&mxid="&mxid&"&id="&zdid3&""" title=""点击修改属性"">"&bdTitle&"</a>"
elseif  instr(zdhz,"paixu")>0  and sExport="" then
if pxu="" or right(pxu,3)="asc" then px1="desc":px2="↑" else  px1="asc":px2="↓"
hzbt=hzbt&"<a href=""?px="&bdname&"-"&px1&""&pgxx0&""" title=""点击排序"">"&bdTitle&""&px2&"</a>"
else
hzbt=hzbt&""&bdTitle&""
end if
hzbt=hzbt&"</th>"

if instr(zdhz,"ltj")>0  then 
zdtjs=zdtjs&"|"&bdTitle
hzbta=hzbta&"<td>"&bdTitle&"</td>"
stname=stname&",sum("&bdname&") as "&bdname&""
else 
hzbta=hzbta&"<td></td>"
'stname=stname&","&bdname&""
end if
hzhes=hzhes&""&zdhz&"|"
if Instr(zdhz,"sorq")>0 then issorq=1:sorq=sorq&" and "&bdname&"-#SJ# "
'if Instr(zdhz,"yu1tx")>0 then yurq=yurq&" and  DATEDIFF('D',"&bdname&",dateadd('d',now(),"&yjday&"))>=0 "

if Instr(zdhz,"yu1tx")>0 and yuok=1 then
if yjday>0 then
yurq=yurq&" and ("&bdname&"-#"&now()&"#>=0 and "&bdname&"-dateadd('d',now(),"&yjday&")<=0) "  
else 
yurq=yurq&" and "&bdname&"-#"&now()&"#>=0 " 
end if
else
end if

if Instr(zdhz,"sook")>0 then sozd=sozd&""&bdname&"|"
hzsjx=hzsjx&""&bdname&"|"
end if
hz00sjx=hz00sjx&""&bdname&"|"
pbkey=""
rsc2.movenext
loop
end if
rsc2.close:set rsc2=nothing
%>

<%
'sql="select ZD_ZX"&stname&" from "&mxbiao&" "
sql="select * from "&mxbiao&" where 1=1 "  

if chk0(xxid)>0 then sql=sql&" and gid="&xxid&""
  
if  nowuserid=1 or instr(nowqx,"admall")>0 or instr(bbal,"shujugx")>0 then
elseif soxs=1 then
sql=sql&" and Instr('"&nowxs&"',zduser)>0 "
else
sql=sql&" and (zduser='"&nowuser&"' or zduser='"&nowuserhao&"' "&souser&" )  "
end if

if nowstartdate<>"" then 
if issorq=1 then sorqa=replace(sorq,"#SJ#","#"&nowstartdate&"#>=0"):sql=sql&" "&sorqa&" "  else  sql=sql&" and tjsj-#"&nowstartdate&"#>=0"
end if
if nowenddate<>"" then 
if issorq=1 then  sorqb=replace(sorq,"#SJ#","#"&nowenddate&"#<=0"):sql=sql&" "&sorqb&" "  else  sql=sql&" and tjsj-#"&nowenddate&"#<=0"
end if

if isyujing=1 then sql=sql&yurq

if ispb=1 and instr(nowqx,"pbkeys")<=0 and nowuserid<>1 then
sql=sql&sopbkey
end if 
  
if nowkeyword<>"" then
soxx1=split(sozd,"|")
for ss=0 to Cntshu(sozd,"|")-1
soxxs=soxxs&" "&soxx1(ss)&" like '%"&nowkeyword&"%' or"
next  
if soxxs<>"" then soxxs1=" and ("&left(soxxs,len(soxxs)-2)&") "

if nowkey2<>"" then
soxx2=split(sozd,"|")
for yy=0 to Cntshu(sozd,"|")-1
so1xxs=so1xxs&" "&soxx2(yy)&" like '%"&nowkey2&"%' or"
next  
if so1xxs<>"" then soxxs2=" and ("&left(so1xxs,len(so1xxs)-2)&") "
end if

sql=sql&soxxs1&soxxs2
pgxx="&keyword="&escape(nowkeyword)&"&key2="&nowkey2&""&pgxx0&""
else
pgxx="&key2="&nowkey2&""&pgxx0&""
end if 

if len(mopx)>1 and (instr(mopx,"asc")>0 or instr(mopx,"desc")>0) then  
sql=sql&" order by "&mopx&" id desc"  
else
if Instr(pxu,"-")>0  then pxqks=replace(pxu,"-"," ") else  pxqks=" id desc "
sql=sql&" order by "&pxqks&" "  
end if

'sql=sql&" group by ZD_ZX" 
'Response.Write ""&sql&"|"&ispb&""
'Response.end   

set rsxiao =server.createobject("ADODB.RecordSet")	
rsxiao.open sql,conn,1,3
if not rsxiao.eof then
'rsxiao.pagesize=maxrecord
'rsxiao.absolutepage=currentpage
shownum=maxrecord
totalrecord=rsxiao.recordcount
rsxiao.pagesize=shownum
maxpage=rsxiao.pagecount
requestpage=clng(request.querystring("p"))
if requestpage="" or requestpage=0 then requestpage=1
if resquestpage>maxpage then resquestpage=maxpage
if not requestpage=1 then rsxiao.move (requestpage-1)*rsxiao.pagesize
%>
<%if sExport="" then%>
<table class="table" width="100%">
<thead>
<%else%>
<table width="100%" cellspacing="0" cellpadding="3" border="1" bordercolor="#000000" style="border-collapse: collapse; <%if sExport="dayin" then%>font-size:10pt<%end if%>">
<%end if%><tr>
<%if instr(quanxs,"smxc")>0 and sExport="" then%><th  width="22"><input name="chkall" type="checkbox" id="chkall" value="select" onClick="CheckAll(this.form)" style="border:0"></th><%end if%>
<%if instr(bbxian,"xsid")>0 then
if sExport="dayin" then dyxxs="合计"
xhge="<td align=""center"">"&dyxxs&"</td>"
%><th>序号</th><%end if%>
<%=hzbt%>
<%if instr(bbxian,"xssj")>0 then%><th>日期</th><%end if%>
<%if instr(quanxs,"smstx")>0 and (issmsok=1 or isemail=1) and  sExport="" then%><th <%=clac%>>提醒 </th><%end if%>
<%if instr(allsx,"bbnocz")>0 and  sExport="" then%><th <%=clac%>>操作 </th><%end if%>
</tr><%if sExport="" then%></thead><tbody><%end if%>
<%
for i=1 to rsxiao.pagesize  and not rsxiao.bof
if rsxiao.eof then exit for
zdid=rsxiao("id"):gida=rsxiao("gid")

if instr(bbal,"biaoge")>0 then hzurl="bao1A.asp" else hzurl="baoA.asp"

%>
<%if sExport="" then%><tr title="双击查看详情" onDblClick="OpenWin('/bao/<%=hzurl%>?cdid=<%=cdid%>&xxid=<%=zdid%>&x1id=<%=x1id%>&mxid=<%=mxid%>&m1id=<%=m1id%>&sid=<%=sid%>','<%=mxname%>详情')" rel="<%=zdid%>"><%else%><tr><%end if%>
<%if instr(quanxs,"smxc")>0  and sExport="" then%><td align="center"><input type="checkbox" name="id" value="<%=zdid%>"></td><%end if%>
<%if instr(bbxian,"xsid")>0 then
if instr(bbal,"zbid")>0 then bhao=bhao+1 else bhao=zdid
%><td align="center"><%=bhao%></td><%end if%>
<%
hzsj1=split(hzsjx,"|")
for hh=0 to Cntshu(hzsjx,"|")-1
zdxxss=Conn.Execute("select zdhz,DefaultValue,Title,FieldType,zdurl,zdshu from SZ_zd where ChannelID="&mxid&" and FieldName='"&hzsj1(hh)&"' ")
zdhz0=zdxxss(0):zdmrz=zdxxss(1):zdlx0=zdxxss(3):zdurl0=zdxxss(4):zdshu0=chk0(zdxxss(5))
if instr(zdhz0,"ltj")>0  then zdhz1=zdxxss(2):tjsjc=tjsjc&"[#]"&zdhz1&"|"&CDbl(chk0(rsxiao(""&hzsj1(hh)&"")))&"":liehe=1
if instr(zdhz0,"mohe")>0 and instr(zdmrz,"|")>0  then
zddat0=split(zdmrz,"|")(0)
zddat1=split(zdmrz,"|")(1)
zdxxs=chk0(Conn.Execute("select sum("&zddat1&") from "&zddat0&" where gid="&zdid&"")(0))
if zdlx0=4 or zdlx0=5 then hzzdzhi=""&hzsj1(hh)&"="&zdxxs&"" else hzzdzhi=""&hzsj1(hh)&"='"&zdxxs&"'"
sql="update "&mxbiao&" set "&hzzdzhi&" where id="&zdid&""
conn.execute(sql)
'zdxxs=zdxxs&hzzdzhi&"|"&zdid
else

zdxx1s=rsxiao(""&hzsj1(hh)&"")
if len(zdxx1s)>30 and sExport="" then zdxxs=left(zdxx1s,30)&".." else zdxxs=zdxx1s
if zdshu0>0 and len(zdxx1s)>zdshu0 and sExport="" then zdxxs=left(zdxx1s,zdshu0)&".."
end if
if hzsj1(hh)="zdsh" then 
if chk0(zdxxs)=1 then zdxxs="<img border=""0"" src=""/images/check.gif"" title=""已审核"">" else  zdxxs="<img border=""0"" src=""/images/DEL.gif"" title=""未审核"">"
end if

if instr(zdhz0,"sook")>0 and len(zdxxs)>0 and sExport="" then 
if cdid=202 and chk0(mxid)=135 then pgxx00=replace(pgxx0,"&mxid=135&","&mxid=40&") else pgxx00=pgxx0
if len(zdxx1s)>1 then
if len(nowkeyword)>1 and nowkeyword<>zdxx1s then key2xx="keyword="&escape(nowkeyword)&"&key2="&escape(zdxx1s)&"" else key2xx="keyword="&escape(zdxx1s)&""
end if
zdxxs="<a href=""hz.asp?"&key2xx&""&pgxx00&""">"&zdxxs&"</a>"
end if  
if len(zdurl0)>5 and  instr(zdhz0,"sook")<=0  and len(zdxxs)>1 and sExport="" then zdxxs="<a target=""_blank"" href="""&replace(zdurl0,"[ZD]",zdxxs)&""">"&zdxxs&"</a>"  
if zdlx0=14 then zdxxs="***"
Response.Write "<td "&clac&">"&zdxxs&"</td>"
next

if instr(quanxs,"smstx")>0 and (issmsok=1 or isemail=1) and  sExport="" then
hzsj2=split(hz00sjx,"|")
for ss=0 to Cntshu(hz00sjx,"|")-1
if instr(smsmb,hzsj2(ss))>0 then smsmb=replace(smsmb,"{"&hzsj2(ss)&"}",""&rsxiao(""&hzsj2(ss)&"")&"")
smsmb=replace(smsmb,"{zduser}",""&nowuserhao&"")
next
end if
%>
<%if instr(allsx,"bbnocz")>0 then%><%if instr(bbxian,"xssj")>0 then%><td align="center"><%=rsxiao("tjsj")%></td><%end if%>
<%if instr(quanxs,"smstx")>0 and (issmsok=1 or isemail=1) and  sExport="" then%><td align="center">
<%if issmsok=1 then%><a  class="hand" onclick="OpenWin('/sms/?smsnr=<%=smsmb%>','短信发送')">短信</a><%end if%> 
<%if isemail=1 then%>- <a  class="hand" onclick="OpenWin('/sms/email.asp?nr=<%=smsmb%>','邮件发送')">邮件</a><%end if%></td><%end if%>
<%if sExport="" then%><td  height="25px"  <%=clac%>>
<%if cdid=202 and chk0(mxid)=135 then%>
<a  class="hand" onclick="OpenWin('/bao/baoE.asp?key1=<%=rsxiao("ZD_SHF")%>&cdid=<%=cdid%>&xxid=<%=zdid%>&mxid=<%=mxid%>&m1id=40&sid=<%=sid%>','<%=mxname%><%=xqnl%>')">总结算单</a>  |
<a href="/set/hz.asp?keyword=<%=rsxiao("ZD_SHF")%>&cdid=<%=cdid%>&mxid=40&sid=<%=sid%>" class="hand">详情</a>
<%elseif cdid=259 then%>
<a  class="hand" onclick="OpenWin('/bao/baoG.asp?key1=<%=rsxiao("ZD_ZYGS")%>&cdid=<%=cdid%>&xxid=<%=zdid%>&mxid=<%=mxid%>&m1id=40&sid=<%=sid%>','<%=mxname%><%=xqnl%>')">应付总结算单</a>
<%else%>
<%if cdid<>204 and chk0(m1id)=0 then%><%=gdcd(mxid,zdid,2,sid1,"",m1id,m2id,cdid,x00id)%> &nbsp;  <a  class="hand" onclick="OpenWin('/bao/<%=hzurl%>?cdid=<%=cdid%>&xxid=<%=zdid%>&x1id=<%=x00id%>&mxid=<%=mxid%>&m1id=<%=m1id%>&sid=<%=sid%>','<%=mxname%><%=xqnl%>')"><%=xqnl%></a>   |  <%end if%><%if instr(quanxs,"xmxg")>0 and (rsxiao("zduser")=nowuser or rsxiao("zduser")=nowuserhao) or  instr(quanxs,"admxgall")>0 then%><a class="hand" <%if chk0(isljqk)=0 then%>onclick="OpenWin('yw.asp?chk=edit&cdid=<%=cdid%>&xxid=<%=zdid%>&x1id=<%=zdid%>&mxid=<%=mxid%>&m1id=<%=m1id%>&sid=<%=sid%>','<%=mxname%><%=xqnl%>')" <%else%> href="yw.asp?chk=edit&cdid=<%=cdid%>&xxid=<%=zdid%>&x1id=<%=zdid%>&mxid=<%=mxid%>&m1id=<%=m1id%>&sid=<%=sid%>"<%end if%>>修改</a><%end if%>
<%end if%>
</td><%end if%><%end if%></tr>
<%
'end if
smsmb=sms1mb
rsxiao.movenext
next
else
%>
<tr align="center"><td colspan="4"><b>没有找到记录</b></td></tr>
<%end if%>
<%
zzdd=split(zdtjs,"|")
for zz=1 to Cntshu(zdtjs,"|")
if zz>1 then hhe0=0
ttss=split(tjsjc,"[#]")
for tt=1 to Cntshu(tjsjc,"[#]")
if zzdd(zz)=split(ttss(tt),"|")(0) then 
hhe0=hhe0+CDbl(split(ttss(tt),"|")(1))
end if
hhe1=hhe0
next

if instr(hzbta,">"&zzdd(zz)&"")>0 then hzbta=replace(hzbta,">"&zzdd(zz)&"",">"&hhe1&"")
'hhee=hhee&""&zzdd(zz)&"："&FormatNumber(hhe1,2,-2)&"，"
next
if right(hhee,1)="，" then hhee=left(hhee,len(hhee)-1)
%>
<%if liehe=1 then%><tr><%if instr(quanxs,"smxc")>0  and sExport="" then%><td>合计</td><%end if%><%=xhge%><%=hzbta%></tr><%end if%>
<%if sExport="" then%></tbody><%end if%></table>
<%if sExport="" then%>
</form>
<%'=hhee%>
<div class="panelBar">
<div class="pages"><%sunday()%><span class="button1"><%=bbxuan(bbal,"?p="&requestpage&""&pgxx&"","lianj")%></span>
</div><div class="fenye ar"><%=fenye(shownum,maxpage,totalrecord,""&pgxx&"&px="&pxu&"")%></div></div>
</div></div></div><%end if%>
<script language="javascript">
function funsokey(){document.all('sokeyso').src="/so.asp?chk=so&dbs=soquan&mozd=sokey&key="+form5.keyword.value;};
</script><%if sExport="dayin" then%><center><%=dayin%></center><%end if%>