?? materialbuytabledetail_insert.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="gb2312" import="cmis.common.*" import="imis_mate.DAO.*" import="imis_mate.bean.*,common.*,imis_mate.common.*" errorPage="error.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'MaterialBuyTableDetail_insert.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body background="/Imis/imis_mate/images/bg_main.png">
<link rel="stylesheet" href="css/style.css" type="text/css"></link>
<script language="JavaScript" src="/Imis/imis_mate/js/checkdata.js"></script>
<script language="JavaScript" src="js/MaterialBuyTable.js"></script>
<script type="text/javascript">
function insert() {
form1.action = "/Buy/imis_mate/MaterialBuyTableServlet?pattern=insert"
}
function insertnew(){
form1.action = "/Buy/imis_mate/MaterialBuyTableServlet?pattern=insertnew"
}
function selectdetail(){
form1.action = "/Buy/imis_mate/MaterialBuyTableServlet?pattern=selectdetail"
}
</script>
<table width="100%" border="0" background="/Imis/imis_mate/images/bg_main2.png">
<tr class="tubiao">
<td>物品采購信息添加</td>
</tr>
</table>
<c:if test="${requestScope.success != null}"><h3>
<div> <br> <span class="ziti">
${requestScope.success}</span></div>
</h3>
</c:if>
<c:if test="${requestScope.MaterialBuyBean==null}">
</c:if>
<c:if test="${requestScope.MaterialBuyBean!=null}">
<%
MaterialBuyBean mbb = new MaterialBuyBean();
mbb = (MaterialBuyBean)request.getAttribute("MaterialBuyBean");
%>
<br/>
<form method="post" action="" name="form1" onsubmit="return checkValue()">
<table align="left" width="617" border="0" class="ziti">
<tr background="/Imis/imis_mate/images/bg_main2.png">
<td align="right" back> </td>
<td colspan="3"> </td>
</tr>
<tr>
<td width="18%" align="right">單據編號</td>
<td colspan="3">
<input name="buyNo" type="text" class="text1" id="buyNo" value="<%=mbb.getBuyNo()%>" size="20" maxlength="30" />
<c:if test="${requestScope.UserIdExisted != null}"> <img src="/Imis_elec/images/error.gif"/><font color="red">
${requestScope.UserIdExisted}</font> </c:if> <font color="#ff0000">*</font></td>
</tr>
<tr>
<td align="right" width="18%">付款方式</td>
<td colspan="3">
<select name="payType" id="payType" class="text1">
<%if(mbb.getPayType().equals("1")){ %>
<option value="1" selected>現金</option>
<option value="2">轉帳</option>
<option value="3" >支票</option>
<option value="4">其他</option>
<%}if(mbb.getPayType().equals("2")){ %>
<option value="1" >現金</option>
<option value="2" selected>轉帳</option>
<option value="3">支票</option>
<option value="4">其他</option>
<%}if(mbb.getPayType().equals("3")){ %>
<option value="1">現金</option>
<option value="2">轉帳</option>
<option value="3" selected>支票</option>
<option value="4">其他</option>
<%}if(mbb.getPayType().equals("4")){ %>
<option value="1">現金</option>
<option value="2">轉帳</option>
<option value="3" >支票</option>
<option value="4" selected>其他</option><%} %>
</select><font color="#ff0000">*</font>
</td> </tr>
<tr>
<td align="right" width="18%">應付賬款</td>
<td colspan="3">
<input type="text" name="rePay" class="text1" value="<%=mbb.getRePay() %>" size="10" maxlength="10"/>
</td> </tr>
<tr>
<td align="right" width="18%">實付賬款</td>
<td colspan="3">
<input type="text" name="acPay" class="text1" value="<%=mbb.getAcPay()%>" size="10" maxlength="10"/>
</td> </tr>
<tr>
<td align="right" width="18%">采購日期</td>
<td colspan="3">
<input name="inDate" id="inDate" size="10" maxlength="10"
value="<%=mbb.getInDate()%>" type="text" class="text1"
readonly="readonly" onMouseDown="javascript:setday(form1.inDate);" /><font color="#ff0000">*</font>
<%-- <Script class="text1">DateBox("inDate")</Script><font color="#ff0000">*</font>--%>
</td> </tr>
<tr>
<td align="right" width="18%">采購人</td>
<td width="30%">
<input type="text" name="buyBy" class="text1" value="<%=mbb.getBuyBy() %>" size="20" maxlength="30"/>
</td>
<td align="right" width="16%">采購部門</td>
<td width="36%">
<select name="buyDep" id="buyDep" class="text1">
<%
int deptId = 0;
String deptName = null;
DepartmentsBean describe = new DepartmentsBean();
ArrayList list = describe.getDepts();
Iterator itr = list.iterator();
while (itr.hasNext()) {
Hashtable ht = (Hashtable) itr.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mbb.getBuyDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<option value=<%=deptId%>><%=deptName%></option>
<%
}
}
%>
</select>
</td>
</tr>
<tr>
<td align="right" width="18%">申請人</td>
<td width="30%">
<input type="text" name="applyBy" class="text1" value="<%=mbb.getApplyBy() %>" size="20" maxlength="30"/>
</td>
<td align="right" width="16%">申請部門</td>
<td width="36%">
<select name="applyDep" id="applyDep" class="text1">
<%
deptId = 0;
deptName = null;
DepartmentsBean describe1 = new DepartmentsBean();
ArrayList list1 = describe1.getDepts();
Iterator itr1 = list1.iterator();
while (itr1.hasNext()) {
Hashtable ht = (Hashtable) itr1.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mbb.getApplyDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<option value=<%=deptId%>><%=deptName%></option>
<%
}
}
%>
</select>
</td>
</tr>
<tr>
<td align="right" width="18%">使用人</td>
<td width="30%">
<input type="text" name="useBy" class="text1" value = "<%=mbb.getUseBy() %>" size="20" maxlength="30" />
</td>
<td align="right" width="16%">使用部門</td>
<td width="36%">
<select name="useDep" id="useDep" class="text1">
<%
deptId = 0;
deptName = null;
DepartmentsBean describe2 = new DepartmentsBean();
ArrayList list2 = describe2.getDepts();
Iterator itr2 = list2.iterator();
while (itr2.hasNext()) {
Hashtable ht = (Hashtable) itr2.next();
deptId = Integer.parseInt(ht.get("deptId").toString());
deptName = ht.get("deptName").toString();
if(mbb.getUseDep()==deptId){%>
<option value=<%=deptId%> selected><%=deptName%></option>
<%}
else
{%>
<option value=<%=deptId%>><%=deptName%></option>
<%
}
}
%>
</select>
</td>
</tr>
<tr>
<td align="right" width="18%">供應商</td>
<td>
<select name="supplyNo" id="supplyNo" class="text1">
<%
SupplyInfoDAO dao = new SupplyInfoDAO();
ArrayList list5 = dao.getSupplyInfo();
Iterator it = list5.iterator();
System.out.println(list5.size());
while(it.hasNext()){
SupplyInfoBean sb = (SupplyInfoBean)it.next();
if(mbb.getSupplyNo()==sb.getSupplyNo()){
%>
<option value=<%=sb.getSupplyNo()%> selected><%=sb.getSupplyName()%></option>
<%
}else{
%>
<option value=<%=sb.getSupplyNo()%>><%=sb.getSupplyName()%></option>
<%
}
}
%>
</select>
</td>
<td align="right" width="16%">采購批準人</td>
<td>
<input type="text" name="perBy" class="text1" value="<%=mbb.getPerBy() %>" size="20" maxlength="30"/>
</td>
<tr>
<td align="right" width="18%">采購原因</td>
<td>
<textarea name="buyFor" rows="5" cols="20" class="textarea1" value="<%=mbb.getBuyFor() %>"></textarea>
</td>
<td align="right" width="16%">單據摘要</td>
<td>
<textarea name="remark" rows="5" cols="20" class="textarea1" value="<%=mbb.getReMark() %>"></textarea>
</td> </tr>
<tr>
<td> </td>
</tr>
<tr>
<td colspan="4" align="center">
<input type="submit" name="Submit" value="添加明細"
onClick="insertnew()" class="anniu" />
<input type="reset" name="Submit" value="重 置" class="anniu">
<input type="submit" name="Submit" value="查詢明細"
onClick="insert()" class="anniu" />
</td> </tr>
</table>
</form>
</c:if>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<iframe src="/Buy/imis_mate/MaterialBuyDetailDisplay.jsp" id="search" name="search" align="bottom" border="0" marginWidth="0" frameSpacing="0" marginHeight="0" frameBorder="0" noResize target="_blank"
width="99%" height="310" scrolling="auto" background="/Imis/imis_mate/images/bg_main.png">
</iframe>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -