⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frm_bngcxg_add.asp

📁 一套石油公司内部的运营管理系统
💻 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" src="/include/calender.js"></SCRIPT>
<SCRIPT LANGUAGE=javascript>
<!--
function subcheck() {
	var well=form1.text1.value;
	if (well=="") {
		window.alert("您没有选择井!");
	}
	else {
		form1.action="frm_bngcxg_add_confirm.asp";
		form1.submit();
	}
}

function wellClick() {
	form1.action="";
	form1.submit();
}
-->
</SCRIPT>

</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"><br>
	<%
	sdate=request("sdate")
	syear=split(sdate,"-")(0)
	smonth=split(sdate,"-")(1)
	swell=request.form("text1")
	if smonth=12 then
		tmonth=1
		tyear=syear+1
	else
		tmonth=smonth+1
		tyear=syear
	end if
	stdate=cdate(syear & "-" & smonth & "-1")
	eddate=cdate(tyear & "-" & tmonth & "-1")-1
	Set Rs = Server.CreateObject("ADODB.RecordSet")
	if welltype=0 then
		SQL="select DISTINCT(xgrb_well_id) from oil.oil_xgrb where xgrb_well_type='0'"
	else
		SQL="select DISTINCT(xgrb_well_id) from oil.oil_xgrb where xgrb_well_type='1'"
	end if
	rs.open SQL,conn
	dim well(),wellCount
	wellCount=0
	do while not rs.eof
		wellCount=wellCount+1
		redim preserve well(wellCount)
		well(wellCount-1)=rs("xgrb_well_id")
		rs.movenext
	loop
	rs.close
	dim stext1,stext2,stext3,stext4,stext5
	if welltype=0 then
		if swell="" then
			stext1=""
			stext2=""
			stext3=""
			stext4=""
			stext5=""
		else
			SQL="select * from oil.oil_xgrb where xgrb_well_id='" &swell& "' and xgrb_date like '" &syear&"-"&smonth&"-"& "%'"
			rs.open SQL,conn
			tscday=0
			tyxday=0
			trzo=0
			tyzo=0
			do while not rs.eof
				tscday=tscday+1
				if cint(rs("xgrb_bf_co"))<=cint(rs("xgrb_af_co")) then
					tyxday=tyxday+1
					trzo=trzo+cint(rs("xgrb_af_co"))-cint(rs("xgrb_bf_co"))
				end if
				rs.movenext
			loop
			rs.close
			stext1=tscday
			stext2=tyxday
			stext3=CDbl(trzo/stext1)
			stext4=trzo
			if smonth=1 then
				pmonth=12
				pyear=syear-1
			else
				pmonth=smonth-1
				pyear=syear
			end if
			SQL="select * from oil.oil_incre where incre_well_id='" &swell& "' and incre_obj_date='" &pyear&"-"&pmonth&"-1"& "'"
			rs.open SQL,conn
			pljzo=0
			if not rs.eof then
				pljzo=rs("incre_ljzy")
			end if
			ljzy=pljzo+trzo
			stext5=ljzy
		end if
	else
		if swell="" then
			stext1=""
			stext2=""
			stext3=""
			stext4=""
			stext5=""
		else
			SQL="select * from oil.oil_xgrb where xgrb_well_id='" &swell& "' and xgrb_date like '" &syear&"-"&smonth&"-"& "%'"
			rs.open SQL,conn
			tscday=0
			tyxday=0
			trzz=0
			tyzz=0
			do while not rs.eof
				tscday=tscday+1
				if cint(rs("xgrb_bf_rzl"))<=cint(rs("xgrb_af_rzl")) then
					tyxday=tyxday+1
					trzz=trzz+cint(rs("xgrb_af_rzl"))-cint(rs("xgrb_bf_rzl"))
				end if
				rs.movenext
			loop
			rs.close
			stext1=tscday
			stext2=tyxday
			stext3=CDbl(trzz/stext1)
			stext4=trzz
			if smonth=1 then
				pmonth=12
				pyear=syear-1
			else
				pmonth=smonth-1
				pyear=syear
			end if
			SQL="select * from oil.oil_cszz where cszz_well_id='" &swell& "' and cszz_obj_date='" &pyear&"-"&pmonth&"-1"& "'"
			rs.open SQL,conn
			pljzz=0
			if not rs.eof then
				pljzz=rs("cszz_ljzz")
			end if
			ljzz=pljzz+trzz
			stext5=ljzz
		end if
	end if
	%>
	<span class="subject">
		添加<%=syear%>年度<%=smonth%>月的月度措施效果统计(<%if welltype=0 then response.write "油井" else response.write "水井" end if%>)
	</span> 
	<hr size="1" class=hr width="98%" align="center">
	<br>
	<form action="" method=post name=form1>
	<table border="1" cellpadding="1" cellspacing="0" align="center" class="table2" 
	  bordercolor="#000000" bordercolordark="#F8EDEB" width="90%">
	  <tr height="20">
	   <td class="title" align=center width=30% colspan=2>措施井号</td>
	   <td align=left width=30%>&nbsp&nbsp
	   <select name=text1 Onchange=wellClick()>
		<option value="">请选择...</option>
		<%for i=0 to wellCount-1%>
		<option value=<%=well(i)%> <%if swell=well(i) then response.write " selected" end if%>><%=well(i)%></option>
		<%next%>
	   </select>
	   </td>
	  </tr> 
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=30% colspan=2>措施内容</td>
	   <td align=left width=70%>&nbsp&nbsp<textarea name=text2 cols=30 rows=3 class=text></textarea></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=30% colspan=2>措施层位</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text3 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=30% colspan=2>完井日期</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text4 size=20 class=text>&nbsp<input type=button value=".." name=datebt class=button onclick="fPopCalendar(text4,text4); return false" alt="按此选时"></td>
	  </tr> 
	  <%if welltype=0 then%>
	  <tr height="20">
	   <td class="title" rowspan=4 align=center width=15%>措施前</td>
	   <td class="title" align=center width=15%>日产液</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text5 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>日产油</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text6 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>含水</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text7 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15% >动液面</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text8 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" rowspan=4 align=center width=15%>措施后</td>
	   <td class="title" align=center width=15%>日产液</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text9 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>日产油</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text10 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>含水</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text11 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>动液面</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text12 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>本月生产天数</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text13 size=20 class=text value=<%=stext1%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>措施有效天数</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text14 size=20 class=text value=<%=stext2%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>日增油量</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text15 size=20 class=text value=<%=stext3%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>月增油量</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text16 size=20 class=text value=<%=stext4%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>累计增油量</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text17 size=20 class=text value=<%=stext5%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>备注</td>
	   <td align=left width=70%>&nbsp&nbsp<textarea name=text18 cols=30 rows=3 class=text></textarea></td>
	  </tr> 
  <%else%>
	  <tr height="20">
	   <td class="title" rowspan=6 align=center width=15%>措施前</td>
	   <td class="title" align=center width=15%>分水器压力</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text5 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>管压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text6 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>油压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text7 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15% >套压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text8 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>配注</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text9 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15% >注水量</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text10 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" rowspan=6 align=center width=15%>措施后</td>
	   <td class="title" align=center width=15%>分水器压力</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text11 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>管压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text12 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>油压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text13 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15% >套压</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text14 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15%>配注</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text15 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" align=center width=15% >注水量</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text16 size=20 class=text></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>措施有效天数</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text17 size=20 class=text value=<%=stext2%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>日增注</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text18 size=20 class=text value=<%=stext3%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>月增注</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text19 size=20 class=text value=<%=stext4%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>累计增注</td>
	   <td align=left width=70%>&nbsp&nbsp<input type=text name=text20 size=20 class=text value=<%=stext5%>></td>
	  </tr> 
	  <tr height="20">
	   <td class="title" colspan=2 align=center width=30%>备注</td>
	   <td align=left width=70%>&nbsp&nbsp<textarea name=text21 cols=30 rows=3 class=text></textarea></td>
	  </tr> 
	  <%end if%>
	</table>
	<br>
	<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=hidden name=sdate value=<%=sdate%>>
			<input type=hidden name=welltype value=<%=welltype%>>
			<input type="button" name="Submit32" value=" 添加 " class=button onclick=subcheck()>
			<input type="button" name="Submit32" value=" 返回 " class=button LANGUAGE=javascript onclick='javascript:location.replace("frm_bngcxg.asp?year=<%=syear%>&month=<%=smonth%>&welltype=<%=welltype%>");'>
		  </td>
		</tr>
	  </table>
	</form>

</body>
</html>
<!--#include virtual="/include/DBClose.inc"-->

⌨️ 快捷键说明

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