<!--#include virtual="/incs/config.asp"-->
<!--#include virtual="/incs/top.asp"-->
<% chk_log()%>
<%
conn.open constr
c_cls=session("usrclass")
%>
<table cellspacing=2 cellpadding=0 width="100%" border=0>
  <tbody> 
  <tr> 
    <td  colspan=2 valign="middle"> 
      <table class=line cellspacing=0 cellpadding=0 width="100%" 
                  border=0 align="center">
        <tbody> 
        <tr> 
          <td valign=bottom width="25%" height=20><font color="#000000" class=ddropshadow><b><span class=enbold><strong>购买价格</strong></span></b></font></td>
          <td valign=bottom noWrap align=right 
                        width="75%">&nbsp;</td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=5></td>
        </tr>
        <tr> 
          <td align=middle width="100%" colspan=2 height=2 class=menuline></td>
        </tr>
        </tbody> 
      </table>
      <br>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="28"> 
      <div align="center">
        <TABLE cellSpacing=0 cellPadding=0  border=0 bordercolordark="#FFFFFF" height="24" align="center" width=95%>
          <tbody> 
          <TR align=center bgcolor="#FFFFFF"> 
            <TD height="22"  align=center> 
              <%
						  query="select * from pdttpe where pt_shw=1 order by pt_odr"
						  rs.open query,conn,1,1
						  if not rs.eof then
						  fstptid=rs("pt_id")
						  while not rs.eof  %>
              <A class=commonface style="text-decoration:underline;" href="mem_prc.asp?ptid=<%=rs("pt_id")%>"> 
              <%=rs("pt_nme")%> </A>| 
              <%
						  rs.movenext
						  
						  wend
						  end if
						  rs.close
  %>
              <A href="mem_prc.asp?ptid=0" class=commonface  style="text-decoration:underline;"> 
              所有产品&nbsp;</A></TD>
          </tr>
          </tbody> 
        </table>
        <br>
        <%
ptid=SafeRequest("ptid")
if chk_int(ptid)=false then
ptid=fstptid
			query="select * from v_pdtlst where g_shw=1  and pt_id="&ptid&"  order by pt_odr,pc_odr,g_odr"
elseif  ptid="0" then
			query="select * from v_pdtlst where g_shw=1   order by pt_odr,pc_odr,g_odr"
else
			query="select * from v_pdtlst where g_shw=1 and pt_id="&ptid&" order by pt_odr,pc_odr,g_odr"
end if	
			rs.open query,conn,1,1
			%>
        <table border=0 cellpadding=0 
                        cellspacing=0 width="100%" bordercolordark="#FFFFFF" align="center" class=datalist>
          <tbody> 
          <form action=prc_mng.asp method=post name=price_all>
            <tr> 
              <th width="6%" class=datalistheader height=20 > 序号 </th>
              <th width="6%" class=datalistheader > 编号 </th>
              <th width="20%" class=datalistheader > 产品名称 </th>
              <th width="10%" class=datalistheader > 一单位 </th>
              <th width="10%" class=datalistheader > 二单位 </th>
              <th width="10%" align="center" class=datalistheader >三单位</th>
              <th width="10%" align="center" class=datalistheader >四单位</th>
              <th width="10%" align="center" class=datalistheader >五单位</th>
              <th  class=datalistheader > 操作 
                <input type=hidden name=module value="prc_edt_all">
                <input type=hidden name=p_cls value="<%=c_cls%>">
              </th>
            </tr>
            <%
	tpenme=""					
  i=1
     do while not rs.eof
	 if  tpenme<>trim(rs("pt_nme")) then
	 %>
            <tr  > 
              <td  align=center colspan=9 class=datalistgridb  HEIGHT=25><font color=#ff0000><b><%=trim(rs("pt_nme"))%></b></font></td>
            </tr>
            <% end if %>
            <tr > 
              <td  align=center  class=datalistgridb ><%=i%></td>
              <td  align=center  class=datalistgridb ><a /href="javascript:showurl('/master/sysmng/pdt_mng/pdt_edt.asp?g_prd=<%=rs("g_prd")%>');"><%=trim(rs("g_prd"))%></a></td>
              <td  align=center  class=datalistgridb ><a /href="javascript:showurl('/master/turn.asp?gid=<%=rs("g_prd")%>');"> 
                <% 
				if trim(rs("g_err"))="" then
						  response.write "<font color=#293954>"&rs("g_nme")&"</font>"
						  else
						  response.write "<br>"&rs("g_nme")&"</b>"
						  end if %>
                </a> </td>
              <td  align=center  class=datalistgridb > 
                <% query1="select * from prclst where p_yar=1 and p_cls="&c_cls&" and p_prd='"&trim(Rs("g_prd"))&"'"
			  rs1.open query1,conn,1,1
			  if not rs1.eof then
			  theprice=rs1("p_prc")&"元/"&tmenmes(rs1("p_tmetpe"))
			  else
			  theprice=""
			  end if
			  rs1.close
			  %>
                &nbsp;<b><%=theprice%></b> </td>
              <td  align=center  class=datalistgridb > 
                <% query1="select * from prclst where p_yar=2 and p_cls="&c_cls&" and p_prd='"&trim(Rs("g_prd"))&"'"
			  rs1.open query1,conn,1,1
			  if not rs1.eof then
			  theprice=rs1("p_prc")&"元/2"&tmenmes(rs1("p_tmetpe"))
			  else
			  theprice=""
			  end if
			  rs1.close
			  %>
                &nbsp;<b><%=theprice%></b> </td>
              <td  align=center  class=datalistgridb > 
                <% query1="select * from prclst where p_yar=3 and p_cls="&c_cls&" and p_prd='"&trim(Rs("g_prd"))&"'"
			  rs1.open query1,conn,1,1
			  if not rs1.eof then
			  theprice=rs1("p_prc")&"元/3"&tmenmes(rs1("p_tmetpe"))
			  else
			  theprice=""
			  end if
			  rs1.close
			  %>
                &nbsp;<b><%=theprice%></b> </td>
              <td  align=center  class=datalistgridb > 
                <% query1="select * from prclst where p_yar=4 and p_cls="&c_cls&" and p_prd='"&trim(Rs("g_prd"))&"'"
			  rs1.open query1,conn,1,1
			  if not rs1.eof then
			  theprice=rs1("p_prc")&"元/4"&tmenmes(rs1("p_tmetpe"))
			  else
			  theprice=""
			  end if
			  rs1.close
			  %>
                &nbsp;<b><%=theprice%></b> </td>
              <td  align=center  class=datalistgridb > 
                <% query1="select * from prclst where p_yar=5 and p_cls="&c_cls&" and p_prd='"&trim(Rs("g_prd"))&"'"
			  rs1.open query1,conn,1,1
			  if not rs1.eof then
			  theprice=rs1("p_prc")&"元/5"&tmenmes(rs1("p_tmetpe"))
			  else
			  theprice=""
			  end if
			  rs1.close
			  %>
                &nbsp;<b><%=theprice%></b> </td>
              <td  align=center  class=datalistgridb > 
                <input type=button name=okit value="购 买" class=btxx onclick="javascript:showurl('/master/turn.asp?gid=<%=rs("g_prd")%>');">
              </td>
            </tr>
            <%
						tpenme=trim(rs("pt_nme"))
  rs.movenext
  
i=i+1
  loop 
  %>
          </form>
          </tbody> 
        </table>
        <table width="95%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height=8></td>
          </tr>
        </table>
        <div align="center"> <br>
          <table cellspacing=0 cellpadding=0  border=0 bordercolordark="#FFFFFF" height="24" align="center" width=95%>
            <tbody> 
            <tr align=center bgcolor="#FFFFFF"> 
              <td height="22"  align=center> 
                <%rs.close
						  query="select * from pdttpe where pt_shw=1 order by pt_odr"
						  rs.open query,conn,1,1
						  if not rs.eof then
						  fstptid=rs("pt_id")
						  while not rs.eof  %>
                <a class=commonface style="text-decoration:underline;" href="mem_prc.asp?ptid=<%=rs("pt_id")%>"> 
                <%=rs("pt_nme")%> </a>| 
                <%
						  rs.movenext
						  
						  wend
						  end if
						  rs.close
  %>
                <a href="mem_prc.asp?ptid=0" class=commonface  style="text-decoration:underline;"> 
                所有产品&nbsp;</a></td>
            </tr>
            </tbody> 
          </table>
        </div>
      </div>
    </td>
  </tr>
  <tr> 
    <td  colspan=2 valign="top" height="20"> <br>
      <br>
    </td>
  </tr>
  </tbody> 
</table>
<!--#include virtual="/incs/bottom.asp"-->

