28,390
社区成员
发帖
与我相关
我的任务
分享
<!--#include file="../../common/public_function.asp" -->
<%set rs=server.CreateObject("adodb.recordset")
sql="select max(a.needtime*300)as long_time from"&""
sql=sql& "(select stepnum,stepname_cn,(case timeunit when 1 then needtime*60 "&""
sql=sql& " when 2 then needtime"&""
sql=sql & " when 3 then needtime/60" & ""
sql=sql& " when 5 then needtime*60*8 end)as needtime" &""
sql=sql & " from eng_product_step where productnum='95969' and engversion='1')a "
rs.open sql,conn,1,1
dim longtime,maxdays
longtime=cint(rs("long_time")/(60*8)) '获取耗时最长时间
maxdays=dateadd("d",longtime,date())
response.Write maxdays
rs.close
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../css/style1.css" type="text/css">
<title>无标题文档</title>
</head>
<body>
<%sql="select a.stepid,a.stepnum,a.productnum,a.stepname_cn,a.stepname_en,a.needtime,b.time_name_en,b.time_name_cn from eng_product_step a,tbl_time_category b " &""
sql=sql&" where a.productnum='95969' and a.engversion='1' and a.timeunit=b.cid"
rs.open sql,conn,1,1%>
<table width="95%" border="1">
<tr>
<td width="33">序号</td>
<td width="97">工序名称</td>
<td width="80">单位用时</td>
<td width="766"><table width="100%" border="1">
<tr>
<%for x=1 to longtime%>
<td style="width:100px;"><%=dateadd("d",x,date)%> <%'从今天起,循环显示日期%></td>
<%next%>
</tr>
</table></td>
</tr>
<%i=0
do while not rs.eof
i=i+1%>
<tr>
<td height="40"><%=rs("stepnum")%></td>
<td><%=rs("stepname_cn")%></td>
<td><%=rs("needtime")%><%=rs("time_name_cn")%></td>
<td>
<div id="Layer1" style="position:absolute; width:<%=cint(((300*rs("needtime")/60)/8)*100)%>px; height:13px; z-index:1; background-color: #0000FF; layer-background-color: #0000FF; border: 1px none #000000;"><font color="#FFFFFF"><%=addzero(((300*rs("needtime")/60)/8))%>day</font></div><%'判断用时长短判道工序的时间长短%>
</td>
</tr>
<%rs.movenext
loop
%>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>