📄 frm_xgrb.asp
字号:
<!--#include virtual="/include/DBCon.inc"-->
<html>
<head>
<title>油田采油工艺综合管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/css/oil.css" type="text/css">
<SCRIPT LANGUAGE=javascript>
<!--
function subcheck(act) {
if (act==0) {
if (form1.chxgrb.value=="") {
window.alert("请选择数据!");
}
else {
form1.action="frm_xgrb_remove.asp";
form1.submit();
}
}
}
function wtCh() {
form1.submit();
}
-->
</SCRIPT>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
<%
welltype=request("welltype")
if welltype="" then
welltype=0
end if
dim xgrb(),xgrbCount
dim twell,tbfCy,tbfCo,tbfHs,tafCy,tafCo,tafHs,trzy,tbfGy,tbfRzl,tafGy,tafRzl,tafRzz
if welltype=0 then
sdate=cdate(request("year") & "-" & request("month") & "-" & request("day"))
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_xgrb where xgrb_date='" &sdate& "' and xgrb_well_type='0'"
rs.open SQL,conn,1,1
xgrbCount=0
do while not rs.eof
xgrbCount=xgrbCount+1
redim preserve xgrb(xgrbCount)
xgrb(xgrbCount-1)=""
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_id")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_well_id")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_csnr")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_wjrq")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_bf_cy")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_bf_co")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_bf_hs")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_af_cy")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_af_co")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_af_hs")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_rzy")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_memo")
rs.movenext
loop
rs.close
%>
<span class="subject">
<%=split(sdate,"-")(0)%>年<%=split(sdate,"-")(1)%>月<%=split(sdate,"-")(2)%>日的措施井(油井)效果跟踪日报
</span>
<hr size="1" class=hr width="98%" align="center">
<form action="" method=post name=form1>
<table width=1000>
<tr>
<td align=left>
<select name=welltype onchange=wtCh()>
<option value=0 selected>油井</option>
<option value=1>水井</option>
</select>
</td>
</tr>
</table>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width=1000>
<tr height="20">
<td class="title" rowspan=2 align=center width=20> </td>
<td class="title" rowspan=2 align=center width=60>井号</td>
<td class="title" rowspan=2 align=center width=120>措施内容</td>
<td class="title" rowspan=2 align=center width=60>完井日期</td>
<td class="title" colspan=3 align=center> 措施前</td>
<td class="title" colspan=3 align=center>目前</td>
<td class="title" rowspan=2 align=center width=60>日增油</td>
<td class="title" rowspan=2 align=center width=120>备注</td>
</tr>
<tr height="20">
<td class="title" align=center width=60>日产液</td>
<td class="title" align=center width=60>日产油</td>
<td class="title" align=center width=60>含水</td>
<td class="title" align=center width=60>日产液 </td>
<td class="title" align=center width=60>日产油</td>
<td class="title" align=center width=60>含水</td>
</tr>
<%
twell=0
tbfCy=0
tbfCo=0
tbfHs=0
tafCy=0
tafCo=0
tafHs=0
trzy=0
for i=0 to xgrbCount-1
twell=twell+1
tbfCy=tbfCy+split(xgrb(i),"@")(5)
tbfCo=tbfCo+split(xgrb(i),"@")(6)
tbfHs=tbfHs+split(xgrb(i),"@")(7)
tafCy=tafCy+split(xgrb(i),"@")(8)
tafCo=tafCo+split(xgrb(i),"@")(9)
tafHs=tafHs+split(xgrb(i),"@")(10)
trzy=trzy+split(xgrb(i),"@")(11)
%>
<tr height="20" align=center>
<td> <input type=checkbox name=chxgrb value=<%=split(xgrb(i),"@")(1)%>></td>
<td> <%=split(xgrb(i),"@")(2)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(xgrb(i),"@")(3)%></textarea></td>
<td> <%=split(xgrb(i),"@")(4)%></td>
<td> <%=split(xgrb(i),"@")(5)%></td>
<td> <%=split(xgrb(i),"@")(6)%></td>
<td> <%=split(xgrb(i),"@")(7)%></td>
<td> <%=split(xgrb(i),"@")(8)%></td>
<td> <%=split(xgrb(i),"@")(9)%></td>
<td> <%=split(xgrb(i),"@")(10)%></td>
<td> <%=split(xgrb(i),"@")(11)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(xgrb(i),"@")(12)%></textarea></td>
</tr>
<%next%>
<tr height="20" align=center>
<td>合计</td>
<td> <%=twell%>口</td>
<td> </td>
<td> </td>
<td> <%=tbfCy%></td>
<td> <%=tbfCo%></td>
<td> <%=tbfHs%></td>
<td> <%=tafCy%></td>
<td> <%=tafCo%></td>
<td> <%=tafHs%></td>
<td> <%=trzy%></td>
<td> </td>
</tr>
</table>
<br>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td align=center>
<input type="button" name="bt1" value="添加新数据" class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_xgrb_add.asp?sdate=<%=sdate%>&welltype=0");'>
<input type="button" name="bt1" value="删除选中的数据" class=button LANGUAGE=javascript onclick=subcheck(0)>
<input type=hidden name=sdate value=<%=sdate%>>
<input type=hidden name=year value=<%=split(sdate,"-")(0)%>>
<input type=hidden name=month value=<%=split(sdate,"-")(1)%>>
<input type=hidden name=day value=<%=split(sdate,"-")(2)%>>
</td>
</tr>
</table>
<%
else
sdate=cdate(request("year") & "-" & request("month") & "-" & request("day"))
Set Rs = Server.CreateObject("ADODB.RecordSet")
SQL="select * from oil.oil_xgrb where xgrb_date='" &sdate& "' and xgrb_well_type='1'"
rs.open SQL,conn,1,1
xgrbCount=0
do while not rs.eof
xgrbCount=xgrbCount+1
redim preserve xgrb(xgrbCount)
xgrb(xgrbCount-1)=""
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_id")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_well_id")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_csnr")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_wjrq")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_bf_gy")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_bf_rzl")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_af_gy")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_af_rzl")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_rzz")
xgrb(xgrbCount-1)=xgrb(xgrbCount-1)& "@" & rs("xgrb_memo")
rs.movenext
loop
rs.close
%>
<span class="subject">
<%=split(sdate,"-")(0)%>年<%=split(sdate,"-")(1)%>月<%=split(sdate,"-")(2)%>日的措施井(水井)效果跟踪日报
</span>
<hr size="1" class=hr width="98%" align="center">
<form action="" method=post name=form1>
<table width=860>
<tr>
<td align=left>
<select name=welltype onchange=wtCh()>
<option value=0>油井</option>
<option value=1 selected>水井</option>
</select>
</td>
</tr>
</table>
<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2"
bordercolor="#000000" bordercolordark="#F8EDEB" width=860>
<tr height="20">
<td class="title" rowspan=2 align=center width=20> </td>
<td class="title" rowspan=2 align=center width=60>井号</td>
<td class="title" rowspan=2 align=center width=120>措施内容</td>
<td class="title" rowspan=2 align=center width=60>完井日期</td>
<td class="title" colspan=2 align=center> 措施前</td>
<td class="title" colspan=2 align=center>目前</td>
<td class="title" rowspan=2 align=center width=60>日增注</td>
<td class="title" rowspan=2 align=center width=120>备注</td>
</tr>
<tr height="20">
<td class="title" align=center width=60>管压</td>
<td class="title" align=center width=60>日注量</td>
<td class="title" align=center width=60>管压</td>
<td class="title" align=center width=60>日注量</td>
</tr>
<%
twell=0
tbfGy=0
tbfRzl=0
tafGy=0
tafRzl=0
tafRzz=0
for i=0 to xgrbCount-1
twell=twell+1
tbfGy=tbfGy+split(xgrb(i),"@")(5)
tbfRzl=tbfRzl+split(xgrb(i),"@")(6)
tafGy=tafGy+split(xgrb(i),"@")(7)
tafRzl=tafRzl+split(xgrb(i),"@")(8)
tafRzz=tafRzz+split(xgrb(i),"@")(9)
%>
<tr height="20" align=center>
<td> <input type=checkbox name=chxgrb value=<%=split(xgrb(i),"@")(1)%>></td>
<td> <%=split(xgrb(i),"@")(2)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(xgrb(i),"@")(3)%></textarea></td>
<td> <%=split(xgrb(i),"@")(4)%></td>
<td> <%=split(xgrb(i),"@")(5)%></td>
<td> <%=split(xgrb(i),"@")(6)%></td>
<td> <%=split(xgrb(i),"@")(7)%></td>
<td> <%=split(xgrb(i),"@")(8)%></td>
<td> <%=split(xgrb(i),"@")(9)%></td>
<td> <textarea rows=2 cols=25 class=text><%=split(xgrb(i),"@")(10)%></textarea></td>
</tr>
<%next%>
<tr height="20" align=center>
<td>合计</td>
<td> <%=twell%>口</td>
<td> </td>
<td> </td>
<td> <%=tbfGy%></td>
<td> <%=tbfRzl%></td>
<td> <%=tafGy%></td>
<td> <%=tafRzl%></td>
<td> <%=tafRzz%></td>
<td> </td>
</tr>
</table>
<br>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr>
<td align=center>
<input type="button" name="bt1" value="添加新数据" class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_xgrb_add.asp?sdate=<%=sdate%>&welltype=1");'>
<input type="button" name="bt1" value="删除选中的数据" class=button LANGUAGE=javascript onclick=subcheck(0)>
<input type=hidden name=sdate value=<%=sdate%>>
<input type=hidden name=year value=<%=split(sdate,"-")(0)%>>
<input type=hidden name=month value=<%=split(sdate,"-")(1)%>>
<input type=hidden name=day value=<%=split(sdate,"-")(2)%>>
</td>
</tr>
</table>
<%
end if
%>
<hr size="1" class=hr width="98%" align="center">
<br>
<table width="98%" border="0" cellspacing="0" cellpadding="2" align="center">
<tr align="center">
<td>
<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_xgrb_form.asp");'>
</td>
</tr>
</table>
</form>
</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -