📄 dis_contract_lease_mod.asp
字号:
<%--
title :
description : list phone contract to continue the lease
@author : wangjn
copy right : copy right (@) 2002
date : 2002-05
--%>
<%@ page language="java" contentType="text/html;charset=gb2312" %>
<%@ include file="/inc/all.jsp" %>
<%@ page import = "com.excenon.core.*,com.excenon.core.db.*,com.xinghe.wuye.device.*" %>
<%@ page import = "com.xinghe.system.*,com.xinghe.wuye.phone.*,com.xinghe.wuye.*" %>
<%@ page import = "java.rmi.RemoteException,java.util.Vector,java.util.*,java.sql.Timestamp" %>
<%
// Create phone remote interface
SBPhoneHome phHome = (SBPhoneHome)EBBeanFactory.findEBHome("com.xinghe.wuye.phone.SBPhoneBean");
SBPhone phInterf = phHome.create();
// get buildingAreaName and room No.
String phoneContractID = ebString.jspr( request.getParameter("phonecontractid") ).gb();// phone contract id from list
String sQuery = "select * from wy_phone_contract where phonecontractid='"+phoneContractID+"'";
String buildingAreaID = MyFun.getColumnResult( sQuery,"buildingareaid" );// contract buildingareaid
String contractStatus = MyFun.getColumnResult( sQuery,"status" );// contract status
String chargeSolidID = MyFun.getColumnResult( sQuery,"chargesolidid" );// chargesolid id
String phoneID = MyFun.getColumnResult( sQuery,"phoneid" );// phone id
String buildingID = MyFun.getColumnResult( sQuery,"buildingid" );// phone contract building id
String roomNo =MyFun.getColumnResult( sQuery,"roomid" );// contract room No.
sQuery = "select * from wy_buildingarea where buildingareaid='"+buildingAreaID+"'";
String buildingAreaName = MyFun.getColumnResult( sQuery,"buildingareaname" );// contract buildingarea name
// set session
session.setAttribute( "mod_phone_contract_id",phoneContractID );
session.setAttribute( "mod_phone_contract_charge_solid_id",chargeSolidID );
session.setAttribute( "mod_phone_contract_building_area_id",buildingAreaID );
session.setAttribute( "mod_phone_contract_building_id",buildingID );
session.setAttribute( "mod_phone_contract_phone_id",phoneID );
session.setAttribute( "mod_phone_contract_room_no",roomNo );
// get uesr ACL
ACL[] mm_ACL = webUser.getA_acl();
// if this loginer can read or manage wuye model
boolean isReader = false, isManager = false, isWebManager = false;
isReader = AccessJudge.hasBuildingAreaRight( buildingAreaID,OperationType.TENANCY_MANAGE,mm_ACL );
isManager = AccessJudge.hasBuildingAreaRight( buildingAreaID,OperationType.TENANCY_MANAGE,mm_ACL );
String strDisabled = "";// disabled button
if( !isManager ){
%>
<jsp:forward page="back.jsp" >
<jsp:param name="failinfo" value="您没有修改电话合同的权限,请与管理员联系!" />
</jsp:forward>
<%
}
// select phone contract
sQuery = "select * from wy_phone_contract where phonecontractid='"+phoneContractID+"'";
PageProperty pgProperty = new PageProperty( 0,1,sQuery );
PageResult pgResult = phInterf.selectPhoneContract( pgProperty );
Vector vResult = pgResult.getPageCollection();
String contractserial = "",
contractdate = "",
startdate = "",
enddate = "",
leasename = "",
linkphone = "",
linkaddr = "",
remark = "";
if( vResult.size()>0 ){
PhoneContract objPhoneContract = (PhoneContract)vResult.elementAt(0);
contractserial = publicFun.DisplayData( objPhoneContract.getContractSerial() );
contractdate = publicFun.DisplayData( objPhoneContract.getContractDate() );
startdate = publicFun.DisplayData( objPhoneContract.getStartDate() );
enddate = publicFun.DisplayData( objPhoneContract.getEndDate() );
leasename = publicFun.DisplayData( objPhoneContract.getLeaseName() );
linkphone = publicFun.DisplayData( objPhoneContract.getLinkPhone() );
linkaddr = publicFun.DisplayData( objPhoneContract.getLinkAddress() );
remark = publicFun.DisplayData( objPhoneContract.getMemory() );
}
%>
<html>
<head>
<title>电话租赁管理--续签合同</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../../css/mm.css" type="text/css">
</head>
<script language="javascript" src="../../inc/public.js"></script>
<script language="javascript">
function subPage( url ){
if( !checkInput() ) return ;
document.theForm.action=url;
document.theForm.submit();
}
function checkInput(){
var contractserial = document.theForm.contractserial.value;
var contractdate = document.theForm.contractdate.value;
var leasename = document.theForm.modleasename.value;
var startdate = document.theForm.startdate.value;
var enddate = document.theForm.enddate.value;
if( contractserial=="" ){
alert( "请输入合同号" );
document.theForm.contractserial.focus();
return false;
}
if( leasename=="" ){
alert( "请输入签约人" );
document.theForm.leasename.focus();
return false;
}
if( contractdate=="" ){
alert( "请输入签约日期" );
document.theForm.contractdate.focus();
return false;
}
if( !isValidDate(contractdate) ){
alert( "签约日期格式不正确" );
document.theForm.contractdate.focus();
return false;
}
if( startdate=="" ){
alert( "请输入开始日期" );
document.theForm.startdate.focus();
return false;
}
if( !isValidDate(startdate) ){
alert( "开始日期格式不正确" );
document.theForm.startdate.focus();
return false;
}
if( enddate=="" ){
alert( "请输入结束日期" );
document.theForm.enddate.focus();
return false;
}
if( !isValidDate(enddate) ){
alert( "结束日期格式不正确" );
document.theForm.enddate.focus();
return false;
}
return true;
}
function subBack(){
document.theForm.action = "phonecontract_list.jsp";
document.theForm.submit();
}
</script>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<form name="theForm" method="post" action="">
<table width="100%" border="0" cellspacing="10" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bborder">
<tr>
<td height="20">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="../../images/loca.gif" width="16" height="16" hspace="3" align="absmiddle">位置: <a href="../index.jsp" target="_top" class="at">租赁管理</a>
> 电话租赁 > 电话租赁管理 > 修改合同</td>
<td align="right" width="30"><a href="#" onClick="self.history.back();"><img src="../../images/back2.gif" hspace="3" border="0" width="16" height="16"></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="btd">
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td align="right" width="22%">小区</td>
<td><span class="ct"><%=buildingAreaName%></span></td>
<td align="right">房号</td>
<td width="38%"><span class="ct"><%=roomNo%></span></td>
</tr>
<tr>
<td align="right">合同号</td>
<td>
<input type="text" name="contractserial" size="15" value="<%=contractserial%>" readonly>
<font color="#FF0000">*</font> </td>
<td align="right" nowrap>签约日期</td>
<td>
<input type="text" name="contractdate" size="15" value="<%=contractdate%>">
<font color="#FF0000">*</font> <input type="button" name="Button3" value="..." onClick="selectDate('contractdate');"></td>
</tr>
<tr>
<td align="right">起始日期</td>
<td>
<input type="text" name="startdate" size="15" value="<%=startdate%>">
<font color="#FF0000">*</font>
<input type="button" name="Button" value="..." onClick="selectDate('startdate');">
</td>
<td align="right">签约人</td>
<td>
<input type="text" name="modleasename" size="15" value="<%=leasename%>">
<font color="#FF0000">*</font> </td>
</tr>
<tr>
<td align="right">结束日期</td>
<td>
<input type="text" name="enddate" size="15" value="<%=enddate%>">
<font color="#FF0000">*</font>
<input type="button" name="Button2" value="..." onClick="selectDate('enddate');">
</td>
<td align="right">联系电话</td>
<td>
<input type="text" name="linkphone" size="15" value="<%=linkphone%>">
</td>
</tr>
<tr>
<td align="right">联系地址</td>
<td colspan="3">
<input type="text" name="linkaddr" size="50" value="<%=linkaddr%>">
</td>
</tr>
<tr>
<td align="right">备注</td>
<td colspan="3">
<input type="text" name="memory" size="50" value="<%=remark%>">
</td>
</tr>
<tr>
<td colspan="4"><hr color=#C1DA90 size=1></td>
</tr>
<tr valign="top" align="center">
<td colspan="4" height="36">
<input type="hidden" name="buildingarea" value="<%=buildingAreaID%>">
<input type="hidden" name="building" value="<%=buildingID%>">
<input type="button" name="BtnSetSolid" value="租金设置" onClick="javascript:subPage('dis_contract_solid_mod.jsp');">
<input type="reset" name="BtnCancel" value="取消">
<input type="button" name="BtnBack" value="返回" onClick="javascript:subBack()">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -