<!--
 *this file is part of nseer erp
 *Copyright (C)2006-2010 Nseer(Beijing) Technology co.LTD/http://www.nseer.com 
 *
 *This program is free software; you can redistribute it and/or
 *modify it under the terms of the GNU General Public License
 *as published by the Free Software Foundation; either
 *version 2 of the License, or (at your option) any later version.
 -->
<%@page contentType="text/html; charset=UTF-8" language="java" import="java.sql.*,include.nseer_cookie.*" import="java.util.*" import="java.io.*" import="include.nseer_cookie.exchange" import="include.nseer_db.*,include.nseerdb.*,java.text.*"%>
<%nseer_db manufacture_db=new nseer_db((String)session.getAttribute("unit_db_name"));%>
<%nseer_db manufacturedb=new nseer_db((String)session.getAttribute("unit_db_name"));%>
<%@include file="../include/head.jsp"%>
<jsp:useBean id="demo" class="include.tree_index.businessComment" scope="page"/>
<%
DealWithString DealWithString=new DealWithString(application);
String mod=request.getRequestURI();
demo.setPath(request);
String handbook=demo.businessComment(mod,"您正在做的业务是：","document_main","reason","value");
%>
<%@taglib uri="/WEB-INF/mytag.tld" prefix="page"%>
<jsp:useBean id="query" scope="page" class="include.query.getRecordCount"/>
<link rel="stylesheet" type="text/css" media="all" href="../../javascript/calendar/calendar-win2k-cold-1.css">
<script type="text/javascript" src="../../javascript/calendar/cal.js"></script>
<script language="javascript" src="../../javascript/winopen/winopen.js"></script>
<%
String design_ID=request.getParameter("design_ID");
try{
String sql="select * from manufacture_design_procedure where design_ID='"+design_ID+"'";
ResultSet rs=manufacturedb.executeQuery(sql);
while(rs.next()){
String check_tag="";
String design_tag="等待";
String color="#FF9A31";
String color1="#FF9A31";
if(rs.getString("design_module_tag").equals("0")||(rs.getString("design_module_tag").equals("1"))){
check_tag="等待";
}else if(rs.getString("design_module_tag").equals("2")){
check_tag="通过";
color1="mediumseagreen";
}else if(rs.getString("design_module_tag").equals("9")){
check_tag="未通过";
color1="red";
}
if(rs.getString("check_tag").equals("1")&&rs.getString("excel_tag").equals("2")&&(rs.getString("design_module_tag").equals("0")||rs.getString("design_module_tag").equals("9")||(rs.getString("design_module_tag").equals("1")&&rs.getString("design_module_change_tag").equals("0")))){
design_tag="等待";
}else if(rs.getString("check_tag").equals("1")&&rs.getString("excel_tag").equals("2")&&(rs.getString("design_module_tag").equals("1")||rs.getString("design_module_tag").equals("3"))&&rs.getString("design_module_change_tag").equals("1")){
design_tag="执行";
color="mediumseagreen";
}else if(rs.getString("check_tag").equals("1")&&rs.getString("excel_tag").equals("2")&&rs.getString("design_module_tag").equals("2")){
design_tag="完成";
color="3333FF";
}
%>
<table <%=TABLE_STYLE3%> class="TABLE_STYLE3">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_HANDBOOK_STYLE1%> class="TD_HANDBOOK_STYLE1"><div class="div_handbook"><%=handbook%></div></td>
</tr>
</table>
<table <%=TABLE_STYLE6%> class="TABLE_STYLE6">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8"><input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" value=<%=demo.getLang("erp","打印")%> onClick="javascript:winopen('query_print.jsp?design_ID=<%=design_ID%>')">&nbsp;<input type="button" <%=BUTTON_STYLE1%> class="BUTTON_STYLE1" value="返回" onClick="history.back()"></td> 
</tr>
</table>
<div id="nseerGround" class="nseerGround">
<%@include file="../include/paper_top.html"%>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5">&nbsp;</td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5"><font size="4"><b><%=demo.getLang("erp","工序物料设计单")%></b></font></td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5">&nbsp;</td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","产品名称")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=exchange.toHtml(rs.getString("product_name"))%>&nbsp;</td>
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","产品编号")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=rs.getString("product_ID")%>&nbsp;</td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","设计人")%>&nbsp;&nbsp;：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=exchange.toHtml(rs.getString("designer"))%>&nbsp;</td>
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%">&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%">&nbsp;</td>
</tr>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5">&nbsp;</td>
</tr>
</table>
<table <%=TABLE_STYLE5%> class="TABLE_STYLE5" id=theObjTable>
<tr <%=TR_STYLE2%> class="TR_STYLE2">
<td <%=TD_STYLE2%> class="TD_STYLE2" width="5%"><%=demo.getLang("erp","序号")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="13%"><%=demo.getLang("erp","工序名称")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="11%"><%=demo.getLang("erp","工序编号")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="13%"><%=demo.getLang("erp","描述")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="11%"><%=demo.getLang("erp","工时数(小时)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="13%"><%=demo.getLang("erp","工时成本小计(元)")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="13%"><%=demo.getLang("erp","物料成本小计")%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="8%"><%=demo.getLang("erp","查看")%></td>
</tr>
<%
int i=1;
String sql6="select * from manufacture_design_procedure_details where design_ID='"+design_ID+"' order by details_number";
ResultSet rs6=manufacture_db.executeQuery(sql6);
while(rs6.next()){
%>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=i%></td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=exchange.toHtml(rs6.getString("procedure_name"))%>&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=rs6.getString("procedure_ID")%>&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=rs6.getString("procedure_describe")%>&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.qformat(rs6.getDouble("labour_hour_amount"))%>&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs6.getDouble("subtotal"))%>&nbsp;</td>
<td <%=TD_STYLE2%> class="TD_STYLE2"><%=demo.aformat(rs6.getDouble("module_subtotal"))%>&nbsp;</td>
<%if(rs6.getString("design_module_tag").equals("1")){%>
<td <%=TD_STYLE2%> class="TD_STYLE2"><a href="query_module_details.jsp?design_ID=<%=design_ID%>&&procedure_name=<%=toUtf8String.utf8String(exchange.toURL(rs6.getString("procedure_name")))%>"><%=demo.getLang("erp","查看")%></a>&nbsp;</td>
<%}else{%>
<td <%=TD_STYLE2%> class="TD_STYLE2">&nbsp;</td>
<%}%>
</tr>
<%i++;}manufacture_db.close();%>
</table>
<table <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE5%> class="TD_STYLE5">&nbsp;</td>
</tr>
</table>
<TABLE <%=TABLE_STYLE4%> class="TABLE_STYLE4">
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","工时总成本")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=demo.aformat(rs.getDouble("cost_price_sum"))%>&nbsp;</td>
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","物料总成本")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=demo.aformat(rs.getDouble("module_cost_price_sum"))%>&nbsp;</td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","设计要求")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="89%" colspan="3"><%=rs.getString("procedure_describe")%>&nbsp;</td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","审核人")%>&nbsp;&nbsp;：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=exchange.toHtml(rs.getString("checker"))%>&nbsp;</td>
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","审核时间")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="40%"><%=exchange.toHtml(rs.getString("check_time"))%>&nbsp;</td>
</tr>
<tr <%=TR_STYLE1%> class="TR_STYLE1">
<td <%=TD_STYLE1%> class="TD_STYLE8" width="10%"><%=demo.getLang("erp","审核意见")%>：</td>
<td <%=TD_STYLE2%> class="TD_STYLE2" width="89%" colspan="3"><%=rs.getString("check_suggestion")%>&nbsp;</td>
</tr>
</table>
<%@include file="../include/paper_bottom.html"%>
</div>
<%
}manufacturedb.close();
}catch (Exception ex){
out.println("error"+ex);
}
%>
<script type="text/javascript">
Calendar.setup ({inputField : "date_start", ifFormat : "%Y-%m-%d", showsTime : false, button : "date_start", singleClick : true, step : 1});
Calendar.setup ({inputField : "date_end", ifFormat : "%Y-%m-%d", showsTime : false, button : "date_end", singleClick : true, step : 1});
</script> 