?? importcontractupdate.jsp
字號(hào):
<%@ taglib prefix="task" uri="/jsp/tld/WuYangTag.tld" %>
<jsp:useBean id="importcontract" class="src.wuyang.ImportContract" scope="page"/>
<jsp:useBean id="moneyflag" class="src.wuyang.MoneyFlag" scope="page"/>
<jsp:useBean id="operation" class="src.wuyang.OperationInfoTra" scope="page"/>
<jsp:useBean id="account" class="src.wuyang.Account" scope="page"/>
<jsp:useBean id="global" class="src.com.MyGlobal" scope="session"/>
<% if (global.isLogined == false) {
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="-4" />
</jsp:forward>
<% }
%>
<%
String contractId=request.getParameter("contractId");
if (request.getParameter("update")!=null)
{
%>
<jsp:setProperty name="importcontract" property="*" />
<%
importcontract.setGlobal(global);
importcontract.setLoadDate( importcontract.stringToDate(request.getParameter("loadDateYear"),request.getParameter("loadDateMonth"),request.getParameter("loadDateDay")) );
importcontract.setArriveDate( importcontract.stringToDate(request.getParameter("arriveDateYear"),request.getParameter("arriveDateMonth"),request.getParameter("arriveDateDay")) );
importcontract.update();
operation.changeState(contractId,6,0);
%>
<jsp:forward page="InsertImportProduct.jsp" >
<jsp:param name="contractId" value="<%=contractId %>" />
<jsp:param name="pageName" value="UpdateImportContract.jsp" />
</jsp:forward>
<%
}
int rtcode=importcontract.load(contractId);
if (rtcode!=1)
{
%>
<jsp:forward page="../pub/DBErr.jsp" >
<jsp:param name="rtcode" value="<%= rtcode %>" />
</jsp:forward>
<%
}
account.load(global.loginName);
if(((account.getEmployeeId()).equals(importcontract.getProposer()) == false)&&(importcontract.getRatifier()!=null))
{
if (importcontract.getContractState()!=9)
{
%>
<jsp:forward page="UpdateImportContract.jsp" >
<jsp:param name="errorName" value="無(wú)權(quán)限修改" />
<jsp:param name="contractId" value="" />
</jsp:forward>
<% }
}
%>
<html>
<head>
<title>產(chǎn)品信息</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../pub/style.css">
<script language ="javascript" src='../pub/pub.js' type=text/javascript></script>
</head>
<script language="JavaScript">
function VerifyInput(e)
{
if(isEmpty(e.contractId.value))
{
alert("請(qǐng)輸入合同編號(hào)");
e.contractId.focus();
return false;
}
if(isEmpty(e.customerId.value))
{
alert("請(qǐng)輸客戶(hù)編碼");
e.customerId.focus();
return false;
}
if(isEmpty(e.arrivPort.value))
{
alert("請(qǐng)輸?shù)竭_(dá)港");
e.arrivPort.focus();
return false;
}
if(noYear(e.loadDateYear.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.loadDateYear.focus();
return false;
}
if(noMonth(e.loadDateMonth.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.loadDateMonth.focus();
return false;
}
if(noDay(e.loadDateDay.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.loadDateDay.focus();
return false;
}
if(isEmpty(e.loadPort.value))
{
alert("請(qǐng)輸裝運(yùn)港");
e.loadPort.focus();
return false;
}
if(noYear(e.arriveDateYear.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.arriveDateYear.focus();
return false;
}
if(noMonth(e.arriveDateMonth.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.arriveDateMonth.focus();
return false;
}
if(noDay(e.arriveDateDay.value))
{
alert("輸入數(shù)據(jù)無(wú)效");
e.arriveDateDay.focus();
return false;
}
if(isEmpty(e.proposer.value))
{
alert("請(qǐng)輸裝運(yùn)港");
e.proposer.focus();
return false;
}
}
</script>
<form method="POST" action="ImportContractUpdate.jsp" onsubmit="return VerifyInput(this);">
<input type="hidden" name="contractId" value="<%=importcontract.getContractId()%>" />
合同編號(hào):<%=importcontract.getContractId()%>
<br>
客戶(hù)編碼:<input type="text" name="customerId" value="<%=importcontract.getCustomerId()%>" />
<br>
合同標(biāo)記:
<select name="contractFlag">
<option value="1" <%if(importcontract.getContractFlag()==1){%> selected <%}%> >進(jìn)口 </option>
<option value="0" <%if(importcontract.getContractFlag()==0){%> selected <%}%> >出口 </option>
</select>
<br>
到達(dá)港:<input type="text" name="arrivPort" value="<%=importcontract.getArrivPort()%>" />
<br>
包裝標(biāo)準(zhǔn):
<textarea name="packStand" rows=3 cols=30><%=importcontract.getPackStand()%>
</textarea>
<br>
質(zhì)量指標(biāo):
<textarea name="qulitity" rows=3 cols=30><%=importcontract.getQulitity()%>
</textarea>
<br>
嘜頭:<input type="text" name="mark" value="<%=importcontract.getMark()%>" />
<br>
保險(xiǎn):
<textarea name="insurance" rows=3 cols=30><%=importcontract.getInsurance()%>
</textarea>
<br>
裝船期:
<input type="text" name="loadDateYear" value="<%=importcontract.getStringDate(importcontract.getLoadDate(),1)%>" size="4" maxlength="4">
年
<input type="text" name="loadDateMonth" value="<%=importcontract.getStringDate(importcontract.getLoadDate(),2)%>" size="2" maxlength="2">
月
<input type="text" name="loadDateDay" value="<%=importcontract.getStringDate(importcontract.getLoadDate(),3)%>" size="2" maxlength="2">
日
<br>
裝運(yùn)港:<input type="text" name="loadPort" value="<%=importcontract.getLoadPort()%>" />
<br>
到貨期:
<input type="text" name="arriveDateYear" value="<%=importcontract.getStringDate(importcontract.getArriveDate(),1)%>" size="4" maxlength="4">
年
<input type="text" name="arriveDateMonth" value="<%=importcontract.getStringDate(importcontract.getArriveDate(),2)%>" size="2" maxlength="2">
月
<input type="text" name="arriveDateDay" value="<%=importcontract.getStringDate(importcontract.getArriveDate(),3)%>" size="2" maxlength="2">
日
<br>
付款條件:
<textarea name="payment" rows=3 cols=30><%=importcontract.getPayment()%>
</textarea>
<br>
其他:
<textarea name="other" rows=3 cols=30><%=importcontract.getOther()%></textarea>
<br>
批注:
<textarea name="comment" rows=3 cols=30><%=importcontract.getComment()%></textarea>
<br>
操作人:<input type="text" name="proposer" value="<%=importcontract.getProposer()%>" />
<br>
幣制:<select name="moneyFlag">
<%
moneyflag.query("", "");
while (moneyflag.next() == 1){
%>
<option value="<%=moneyflag.getMoneyFlag()%>" <%if (moneyflag.getMoneyFlag() == importcontract.getMoneyFlag()){%> selected <%}%>>
<%=moneyflag.getMoneyFlagDesc()%>
</option>
<%
}
%>
</select>
<br>
<p>
<input type="submit" name="update" value="修改" />
<input type="reset" value="重置" />
</form>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -