221 lines
6.7 KiB
Plaintext
221 lines
6.7 KiB
Plaintext
|
|
<%@ page contentType="text/html; charset=GBK" %>
|
|||
|
|
<%@ page import="java.util.*"%>
|
|||
|
|
<%@ page import="com.wxzd.wms.util.ServerUtil"%>
|
|||
|
|
<html><head>
|
|||
|
|
<title><3E>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>ȷ<EFBFBD><C8B7></title>
|
|||
|
|
<link rel="stylesheet" type="text/css" href="css/sm.css">
|
|||
|
|
<script type="text/javascript" src="script/ajax.js"></script>
|
|||
|
|
<script type="text/javascript" src="script/pd.js"></script>
|
|||
|
|
<script type="text/javascript" src="script/logic.js"></script>
|
|||
|
|
</head>
|
|||
|
|
<jsp:useBean id="db1" scope="application" class="com.zcsoft.dbvisit.DB" />
|
|||
|
|
<%
|
|||
|
|
String errorInfo = null, pddh = null, kwbh = null;
|
|||
|
|
session = request.getSession(false);
|
|||
|
|
if (session != null && session.getAttribute("userInfo") != null)
|
|||
|
|
{
|
|||
|
|
pddh = request.getParameter("pddh");
|
|||
|
|
kwbh = request.getParameter("kwbh");
|
|||
|
|
//<2F>̵㵥<CCB5>š<EFBFBD><C5A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>̵㵥<CCB5><E3B5A5>
|
|||
|
|
if (pddh != null && pddh.length() > 0
|
|||
|
|
&& kwbh != null && kwbh.length() > 1)
|
|||
|
|
{
|
|||
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>̵㵥<CCB5><E3B5A5><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD>Ч<EFBFBD><D0A7>PEDING <20><>Ϊ<EFBFBD><CEAA>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3><EFBFBD><EFBFBD>Լ<EFBFBD><D4BC>鲻<EFBFBD><E9B2BB>Ҫ
|
|||
|
|
//db1.getSingleField("SELECT )
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{//<2F><><EFBFBD><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD>̵㵥<CCB5>ŵĽ<C5B5><C4BD><EFBFBD>
|
|||
|
|
if (pddh != null && pddh.length() == 0) pddh = null;
|
|||
|
|
if (kwbh != null && kwbh.length() == 0) kwbh = null;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
response.sendRedirect("sm.jsp");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
%>
|
|||
|
|
<body>
|
|||
|
|
<form name=pdbjxx onsubmit="return check(false);">
|
|||
|
|
<table align="center">
|
|||
|
|
<%
|
|||
|
|
if (errorInfo != null)
|
|||
|
|
{
|
|||
|
|
out.println("<tr><td colspan=2><font color=red>" + errorInfo + "</font>");
|
|||
|
|
}
|
|||
|
|
if (pddh == null)
|
|||
|
|
{//<2F><><EFBFBD><EFBFBD><EFBFBD>̵㵥ѡ<E3B5A5><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
out.println("<tr><td colspan=2 class=title><3E><>ѡ<EFBFBD><D1A1><EFBFBD>̵㵥");
|
|||
|
|
List pds = db1.getVDataWithException("SELECT pddh,zcfl,model FROM pdd_sm_v WHERE zt IN(0,1) ORDER BY 1");
|
|||
|
|
out.println("<tr><td colspan=2><table border=1>");
|
|||
|
|
out.println("<tr bgcolor=gray><th><3E><><EFBFBD><EFBFBD><th><3E>豸<EFBFBD><E8B1B8><EFBFBD><EFBFBD><th><3E>ͺ<EFBFBD>");
|
|||
|
|
for (int i = 0; i < pds.size(); i++)
|
|||
|
|
{
|
|||
|
|
List row = (List)pds.get(i);
|
|||
|
|
int j = 0;
|
|||
|
|
String dh = (String)row.get(j++);
|
|||
|
|
out.write("<tr><td><input name=pddh type=radio value=\"");
|
|||
|
|
out.write(dh);out.write("\"");
|
|||
|
|
if (i == 0 && pds.size() == 1)
|
|||
|
|
{
|
|||
|
|
out.write(" checked");//<2F><>һ<EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>ʱ<EFBFBD><CAB1>Ĭ<EFBFBD><C4AC>ѡ<EFBFBD><D1A1>
|
|||
|
|
}
|
|||
|
|
out.write(">");out.write(dh);
|
|||
|
|
out.write("<td>");out.write((String)row.get(j++));//zcfl
|
|||
|
|
out.write("<td>");out.write((String)row.get(j++));//model
|
|||
|
|
}
|
|||
|
|
out.println("</table>");
|
|||
|
|
out.println("<tr><td colspan=2><input name=submit type=submit value=\"<22><> <20><>\">");
|
|||
|
|
}
|
|||
|
|
else if (kwbh == null)
|
|||
|
|
{
|
|||
|
|
out.write("<input type=hidden name=pddh value=\"" + pddh + "\">");
|
|||
|
|
List pdds = db1.getVDataWithPrepareStatement("SELECT kwbh,kssl,tpbh,qczt FROM w_pdmx"
|
|||
|
|
+ " WHERE pddh=? AND qczt<2 ORDER BY kwbh"
|
|||
|
|
, pddh);
|
|||
|
|
if (pdds.size() == 0)//ȫ<><C8AB>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>ˣ<EFBFBD><CBA3>Ͷ<EFBFBD><CDB6><EFBFBD><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8>
|
|||
|
|
{
|
|||
|
|
response.sendRedirect("pd.jsp?pddh=" + pddh + "&kwbh=0");
|
|||
|
|
return;
|
|||
|
|
}
|
|||
|
|
out.println("<tr><td colspan=2 class=title><3E><>ѡ<EFBFBD><D1A1><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>λ");
|
|||
|
|
out.println("<tr><td colspan=2><table border=1>");
|
|||
|
|
out.println("<tr bgcolor=gray><th><3E><>λ<EFBFBD><CEBB><th><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><th><3E><><EFBFBD>̺<EFBFBD><th>ȡ<><C8A1>״̬");
|
|||
|
|
for (int i = 0; i < pdds.size(); i++)
|
|||
|
|
{
|
|||
|
|
List row = (List)pdds.get(i);
|
|||
|
|
int j = 0;
|
|||
|
|
kwbh = (String)row.get(j++);
|
|||
|
|
String kssl = (String)row.get(j++);
|
|||
|
|
String tpbh = (String)row.get(j++);
|
|||
|
|
|
|||
|
|
out.write("<tr><td>");
|
|||
|
|
out.write("<input name=kwbh type=radio value=\"");
|
|||
|
|
out.write(kwbh + "|" + kssl + "|" + tpbh);out.write("\"");
|
|||
|
|
if (i == 0) out.write(" checked");
|
|||
|
|
out.write(">");
|
|||
|
|
out.write(kwbh);
|
|||
|
|
out.write("<td class=numeric>");out.write(kssl);
|
|||
|
|
out.write("<td>");out.write(tpbh);
|
|||
|
|
int qczt = ServerUtil.getInt((String)row.get(j++));
|
|||
|
|
String qcztms;
|
|||
|
|
switch (qczt)
|
|||
|
|
{
|
|||
|
|
case 0:
|
|||
|
|
qcztms = "<22><><EFBFBD><EFBFBD>";
|
|||
|
|
break;
|
|||
|
|
case 1:
|
|||
|
|
qcztms = "ִ<><D6B4><EFBFBD><EFBFBD>";
|
|||
|
|
break;
|
|||
|
|
case 2:
|
|||
|
|
qcztms = "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
|||
|
|
break;
|
|||
|
|
case 4:
|
|||
|
|
qcztms = "<22>ճ<EFBFBD>";
|
|||
|
|
break;
|
|||
|
|
default:
|
|||
|
|
qcztms = Integer.toString(qczt);
|
|||
|
|
break;
|
|||
|
|
}
|
|||
|
|
out.write("<td>");out.write(qcztms);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
out.println("</table>");
|
|||
|
|
out.println("<tr><td colspan=2><input name=submit type=submit value=\"<22><> <20><>\">");
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
Map pddxx;
|
|||
|
|
String zlh = null, pdkw = null, zmsl = null, tpbh = null;
|
|||
|
|
if (kwbh.indexOf('|') > 0)
|
|||
|
|
{
|
|||
|
|
int indexSeparator = kwbh.indexOf('|');
|
|||
|
|
int indexSeparator2 = kwbh.indexOf('|', indexSeparator + 1);;
|
|||
|
|
pdkw = kwbh.substring(0, indexSeparator);
|
|||
|
|
zmsl = kwbh.substring(indexSeparator + 1, indexSeparator2);//Ԥ<><D4A4><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
tpbh = kwbh.substring(indexSeparator2 + 1);
|
|||
|
|
}
|
|||
|
|
//<2F><>ʾ<EFBFBD>̵㵥<CCB5>źͿ<C5BA>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
|||
|
|
out.write("<input type=hidden name=pddh value=\"" + pddh + "\">");
|
|||
|
|
out.write("<input type=hidden name=kwbhAndTpbh value=\"" + (pdkw != null?pdkw + "|" + tpbh:"") + "\">");
|
|||
|
|
out.write("<tr><td colspan=2><3E>̵㵥<CCB5><E3B5A5>" + pddh);
|
|||
|
|
|
|||
|
|
if (pdkw != null)
|
|||
|
|
{
|
|||
|
|
pddxx = db1.getSingleRow("SELECT SUM(CASE sfsm WHEN 1 THEN 1 ELSE 0 END) smsl,SUM(CASE sfsm WHEN 0 THEN 1 ELSE 0 END) wssl,COUNT(*) kssl"
|
|||
|
|
+" FROM w_pdbjxx WHERE kwbh=? AND pddh=?"
|
|||
|
|
, new Object[]{pdkw, pddh});
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
pddxx = db1.getSingleRow("SELECT SUM(CASE sfsm WHEN 1 THEN 1 ELSE 0 END) smsl,SUM(CASE sfsm WHEN 0 THEN 1 ELSE 0 END) wssl,COUNT(*) kssl"
|
|||
|
|
+" FROM w_pdbjxx WHERE pddh=?"
|
|||
|
|
, pddh);
|
|||
|
|
}
|
|||
|
|
if (pddxx != null)
|
|||
|
|
{
|
|||
|
|
int cnt = ServerUtil.getInt(pddxx.get("smsl"));//ɨ<><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ĸ<EFBFBD><C4B8><EFBFBD>
|
|||
|
|
out.write("<tr bgcolor=yellow><td colspan=2 id=count total=" + cnt + ">");
|
|||
|
|
out.write(cnt == 0?"<22><>ɨ<EFBFBD><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϵı<CFB5><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>":("<22><>ɨ<EFBFBD><C9A8>ȷ<EFBFBD>ϵı<CFB5><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" + cnt));
|
|||
|
|
|
|||
|
|
out.println("<tr><td width=60><3E><> <3B>룺<td><input name=barcode size=25 maxlength=40>");
|
|||
|
|
out.write("<input id=\"jhs\" type=hidden name=jhs value=\"");
|
|||
|
|
out.write("\">");
|
|||
|
|
}
|
|||
|
|
//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD>̱<EFBFBD><CCB1><EFBFBD>
|
|||
|
|
if (pdkw != null)
|
|||
|
|
{
|
|||
|
|
if (pddxx != null)
|
|||
|
|
{
|
|||
|
|
String wssl = (String)pddxx.get("wssl");
|
|||
|
|
out.write("<tr><td>δɨ<CEB4><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><td id=wssl>");
|
|||
|
|
out.write(wssl);
|
|||
|
|
out.write("<tr><td><3E>̵<EFBFBD><CCB5><EFBFBD>λ<EFBFBD><CEBB><td id=pdkw>");
|
|||
|
|
out.write(pdkw);
|
|||
|
|
out.println("<tr><td><3E><><EFBFBD>̺ţ<CCBA><td id=tpbh>");
|
|||
|
|
out.write(tpbh);
|
|||
|
|
if (db1.hasAnyData("SELECT 2 FROM w_pdmx WHERE pddh=? AND kwbh=? AND qczt<2", new Object[]{pddh, pdkw}))
|
|||
|
|
{
|
|||
|
|
out.write("<input name=cmdQctp type=button value=ȡ<><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> onclick=\"qctp('" + pddh + "','" + pdkw + "','" + tpbh + "');\">");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
out.println("<22>̵<EFBFBD><CCB5><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{//<2F><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD>̵㵥ɨ<E3B5A5><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͬ<EFBFBD>Ѱ<EFBFBD><D1B0><EFBFBD><EFBFBD>̵<EFBFBD><CCB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
if (pddxx != null)
|
|||
|
|
{
|
|||
|
|
String wssl = (String)pddxx.get("wssl");
|
|||
|
|
out.write("<tr><td>δɨ<CEB4><C9A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><td id=wssl>");
|
|||
|
|
out.write(wssl);
|
|||
|
|
out.println("<tr><td><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><td>");
|
|||
|
|
out.write((String)pddxx.get("kssl"));
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
else
|
|||
|
|
{
|
|||
|
|
out.println("<22>̵㵥<CCB5><E3B5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
out.println("<tr><td><input name=submit type=submit value=\"<22><> <20><>\">");
|
|||
|
|
out.write("<td><input name=cmdSave type=button value=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> onclick=\"save();\">");
|
|||
|
|
if (db1.hasAnyData("SELECT 2 FROM w_pdmx WHERE pddh=? AND smzt=0"
|
|||
|
|
+ (pdkw != null?(" AND kwbh='" + pdkw + "'"):""), pddh))
|
|||
|
|
{
|
|||
|
|
out.write(" <input name=cmdEnd type=button value=<3D><><EFBFBD><EFBFBD>ɨ<EFBFBD><C9A8> onclick=\"endScan();\">");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
%>
|
|||
|
|
</table>
|
|||
|
|
</form>
|
|||
|
|
</body>
|
|||
|
|
<script language=javascript>
|
|||
|
|
check(true);
|
|||
|
|
</script>
|
|||
|
|
</html>
|