<!--#INCLUDE FILE="../HXINCLUDE/HXINCLUDEHEAD.ASP"-->
<!--#INCLUDE FILE="../HXINCLUDE/SelectDate.asp"-->
<%if WS_S.MemberPriv("WS_PublicAffairsPropertyModify")<>1 then HX_GoBack "对不起,您的权限不够!",""
ColumnName="":Tablename="HX_Property":Orderby=" order by WS_PPID desc"
action=request("action")
if action="saveinfo" then  Orderby=" where WS_PropertyNUM='"&request("pnumber")&"'"
set rs=WS_S.HX_SetRSD(ColumnName,Tablename,Orderby)
if action="saveinfo" then
if rs.recordcount>0 then
  HX_GoBack "资产编号有重复！","" 
else
  pnumber=request("pnumber")
  rs.addnew
  rs("WS_PropertyName")=request("pname")
  rs("WS_PropertyNUM")=pnumber
  if isdate(request("Date1")) then
  rs("WS_PropertyTableDate")=request("Date1")
  end if
  rs("WS_PropertyKind")=request("pkind")
  if isnumeric(request("pprice")) then
  rs("WS_PropertyPrice")=request("pprice")
  end if
  if isdate(request("Date2")) then
  rs("WS_PropertyBuyDate")=request("Date2")
  end if
  if isnumeric(request("oldyear")) then
  rs("WS_PropertyOldYear")=request("oldyear")
  end if
  rs("WS_PropertyRemark")=request("remark")
  if isnumeric(request("WS_jbmanUid")) then
  rs("WS_PropertyHXManID")=request("WS_jbmanUid")
  end if
  if isnumeric(request("WS_zcmanUid")) then
  rs("WS_PropertyGLManID")=request("WS_zcmanUid")
  end if
  if isnumeric(request("WS_cwmanUid")) then
  rs("WS_PropertyCWManID")=request("WS_cwmanUid")
  end if
  rs("WS_PropertyAddDate")=now
  rs.update
  response.write "<script>if(!confirm('是否继续添加？')) location.href='propertymanage.asp';else location.href='propertyadd.asp';</script>"
  response.end
end if
end if
if rs.recordcount>0 then
 if rs("WS_PropertyNUM")<>"" then
  PropertyNumber=mid(rs("WS_PropertyNUM"),1,len(rs("WS_PropertyNUM"))-1)
  Num=right(rs("WS_PropertyNUM"),1)
  if Num<>"" and isnumeric(Num) then
    PropertyNumber=PropertyNumber&(Num+1)
  else
    PropertyNumber=PropertyNumber&"1001"
  end if
  else
   PropertyNumber="ZC1001"
  end if
else
  PropertyNumber="ZC1001"
end if
response.Write "<head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title>资产登记</title><link rel=stylesheet type=text/css href='../HXinclude/HX_Style.css'><script src='../HXinclude/HX_Function.js'></script></head><body topmargin='20' leftmargin='0' bottommargin='0'><table width='596'  border='0' cellspacing='1' cellpadding='0' align=center bgcolor='#613c25'><tr><td colspan='2' bgcolor=FFFBE8><table width='100%'  border='0' cellspacing='0' cellpadding='0'><tr><td height='25' background='../hximages/titleline.gif'><font class='fontmenu'>资产登记</font></td></tr></table><table width='100%'  border='0' cellspacing='1' cellpadding='3' bgcolor=FFFBE8><form name='form1' method='post' action='?action=saveinfo' onSubmit='return propertycheck(this);'><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>资产编号</td><td width='78%'><input name='pnumber' type='text' value='"&PropertyNumber&"' size='40' title='编号格式为：前两位为大写字母，后面跟大于1000的数字'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>制表时间</td><td width='78%'><input name='Date1' type='text' title='选择制表时间' value='"&date&"' size='15' readonly> <input onclick=""popUpcalendar(this, form1.Date1, 'yyyy-mm-dd')"" type='button' value='选择' title='选择制表时间'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>资产名称</td><td width='78%'><input type='text' name='pname' size='40'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>规格型号</td><td width='78%'><input type='text' name='pkind' size='40'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>价　　格</td><td width='78%'><input name='pprice' type='text' style='ime-mode:disabled' value='1.5' size='15'><font color=FF0000>万元 *只允许填入数字</font></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>购入时间</td><td width='78%'><input name='Date2' type='text' title='选择购入时间' value='"&date&"' size='15' readonly> <input onclick=""popUpcalendar(this, form1.Date2, 'yyyy-mm-dd')"" type='button' value='选择' title='选择购入时间'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>折旧年限</td><td width='78%'><input name='oldyear' type='text' style='ime-mode:disabled' value='1.5' size='15'><font color=FF0000>年 *只允许填入数字</font></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>经 办 人</td><td width='78%'><input type='hidden' name='WS_jbmanUid'> <input type='text' name='WS_jbmanName' size='30' readonly title='在后面选择对象'> <input type='button' name='Submit2' value='选择对象' onClick=""openwin(510,500,'../HXinclude/HX_Checkuser.asp?checkuser=jbman')"" title='在后面选择对象'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>资产管理人</td><td width='78%'><input type='hidden' name='WS_zcmanUid'><input type='text' name='WS_zcmanName' size='30' readonly title='在后面选择对象'> <input type='button' name='Submit3' value='选择对象' onClick=""openwin(510,500,'../HXinclude/HX_Checkuser.asp?checkuser=zcman')"" title='在后面选择对象'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%'>财务负责人</td><td width='78%'><input type='hidden' name='WS_cwmanUid'><input type='text' name='WS_cwmanName' size='30' readonly title='在后面选择对象'> <input type='button' name='Submit4' value='选择对象' onClick=""openwin(510,500,'../HXinclude/HX_Checkuser.asp?checkuser=cwman')"" title='在后面选择对象'></td></tr><tr bgcolor='#FFFBE8' onmouseover=javascript:this.bgColor='#F9F8F2' onmouseout=javascript:this.bgColor='#FFFBE8'><td width='22%' height='44' valign='top'>备　　　注</td><td width='78%' height='44'><textarea name='remark' cols='42' rows='4' class='bgline'></textarea></td></tr><tr bgcolor='#FFFBE8'><td>&nbsp;</td><td><input type='submit' name='Submit' value=' 登 记 '> <input type='reset' name='Submit' value=' 重 输 '></td></tr></form></table></td></tr></table>"%>