56770_addproduct.asp
上传用户:feitengda
上传日期:2022-07-20
资源大小:73k
文件大小:6k
- <!--#include file="conn.asp"-->
- <%
- call admintop()
- if session("admin_name")="" then
- adminflag()
- else
- dim action
- action=request("action")
- select case action
- '----------------------------------------
- case "add"
- if trim(request("p_name"))<>"" then
- set rs=server.CreateObject("adodb.recordset")
- rs.Open "select * from 56770_product", conn, 1, 3
- rs.AddNew
- rs("p_name")=trim(request("p_name"))
- rs("p_bianma")=trim(request("p_bianma"))
- rs("p_sort")=trim(request("p_sort"))
- rs("p_chandi")=trim(request("p_chandi"))
- rs("p_guige")=trim(request("p_guige"))
- rs("p_danwei")=trim(request("danwei"))
- rs("p_price")=cint(trim(request("p_price")))
- rs("p_pfprice")=cint(trim(request("p_pfprice")))
- rs("p_cbprice")=cint(trim(request("p_cbprice")))
- rs("p_count")=cint(trim(request("p_count")))
- rs("p_kucun")=cint(trim(request("p_count")))
- rs("p_yaochang")=trim(request("p_yaochang"))
- rs("p_jinhuoshang")=trim(request("p_jinhuoshang"))
- rs.Update
- rs.Close
- set rs=nothing
- response.Redirect "56770_product.asp"
- response.end
- end if
- end select
- %>
- <table border="0" cellspacing="1" cellpadding="0" height="0" align=center width="98%" bgcolor="#183789">
- <tr>
- <td>
- <table border="0" cellspacing="1" cellpadding="4" bgcolor="#FFFFFF" align="center" width="100%">
- <tr>
- <td height=15 align=center colspan=17 class=classtop>药品添加</td>
- </tr>
- <tr>
- <form name="form1" method="post" action="56770_addproduct.asp?action=add">
- <td height="25" width="20%" align="center" class="classtd">药品类别名:</td><td>
- <select name="p_sort1" onChange="(document.form1.p_sort.value=this.options[this.selectedIndex].value)">
- <%set rsa=server.CreateObject("adodb.recordset")
- rsa.open "select * from 56770_sort order by s_paixu desc", conn, 1, 1
- if rsa.eof and rsa.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rsa.eof
- %>
- <option value="<%=rsa("s_name")%>"><%=rsa("s_name")%></option>
- <%
- rsa.movenext
- loop
- end if
- rsa.close
- set rsa=nothing%>
- </select>
- <input type=text name="p_sort" size="20">
- </td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品名:</td><td><input type=text name=p_name size="50"></td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品编码:</td><td><input type=text name=p_bianma></td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" colspan=2>药品总数:<input type=text name="p_count" onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- 药品零售价:<input type=text name="p_price" onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- 药品批发价:<input type=text name="p_pfprice" onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- 药品进价:<input type=text name="p_cbprice" onkeyup="value=value.replace(/[^d.]/g,'');" size="3">
- </td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品单位:</td><td>
- <select name="p_danwei1" onChange="(document.form1.p_danwei.value=this.options[this.selectedIndex].value)">
- <option value="箱">箱</option>
- <option value="盒">盒</option>
- <option value="瓶">瓶</option>
- <option value="支">支</option>
- <option value="粒">粒</option>
- <option value="丸">丸</option>
- </select>
- <input type=text name="p_danwei" size="20"></td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品规格:</td><td>
- <select name="p_guige1" onChange="(document.form1.p_guige.value=this.options[this.selectedIndex].value)">
- <%set rsa=server.CreateObject("adodb.recordset")
- rsa.open "select * from 56770_guige order by g_paixu desc", conn, 1, 1
- if rsa.eof and rsa.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rsa.eof
- %>
- <option value="<%=rsa("g_name")%>"><%=rsa("g_name")%></option>
- <%rsa.movenext
- loop
- end if
- rsa.close
- set rsa=nothing%>
- </select>
- <input type=text name="p_guige" size="20">
- </td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品产地:</td><td>
- <select name="p_chandi1" onChange="(document.form1.p_chandi.value=this.options[this.selectedIndex].value)">
- <%set rsa=server.CreateObject("adodb.recordset")
- rsa.open "select * from 56770_chandi order by c_paixu desc", conn, 1, 1
- if rsa.eof and rsa.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rsa.eof
- %>
- <option value="<%=rsa("c_name")%>"><%=rsa("c_name")%></option>
- <%rsa.movenext
- loop
- end if
- rsa.close
- set rsa=nothing%>
- </select>
- <input type=text name="p_chandi" size="20">
- </td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">药品药厂:</td><td>
- <select name="p_yaochang1" onChange="(document.form1.p_yaochang.value=this.options[this.selectedIndex].value)">
- <%set rsa=server.CreateObject("adodb.recordset")
- rsa.open "select * from 56770_yaochang order by y_paixu desc", conn, 1, 1
- if rsa.eof and rsa.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rsa.eof
- %>
- <option value="<%=rsa("y_name")%>"><%=rsa("y_name")%></option>
- <%rsa.movenext
- loop
- end if
- rsa.close
- set rsa=nothing%>
- </select>
- <input type=text name="p_yaochang" size="50">
- </td>
- </tr>
- <tr class="classtd">
- <td height="25" align="center" class="classtd">进货商:</td><td>
- <select name="p_jinhuoshang1" onChange="(document.form1.p_jinhuoshang.value=this.options[this.selectedIndex].value)">
- <%set rsa=server.CreateObject("adodb.recordset")
- rsa.open "select * from 56770_jinhuoshang order by j_paixu desc", conn, 1, 1
- if rsa.eof and rsa.bof then
- response.write "还没有数据,请添加!"
- else
- do while not rsa.eof
- %>
- <option value="<%=rsa("j_name")%>"><%=rsa("j_name")%></option>
- <%rsa.movenext
- loop
- end if
- rsa.close
- set rsa=nothing%>
- </select>
- <input type=text name="p_jinhuoshang" size="50">
- </td>
- </tr>
- <tr class="classtd">
- <td class="classtd" align="center" colspan="2">
- <input type="submit" name="Submit" value="添加">
- </td>
- </form>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <%end if%>