📄 index.php
字号:
<?
include_once("inc/auth.php");
include_once("inc/utility_all.php");
$PAGE_SIZE=10;
?>
<html>
<head>
<title>合同快速搜索 </title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script Language="JavaScript">
function check_one(el)
{
if(!el.checked)
document.all("allbox").checked=false;
}
function delete_customer(CONTRACT_ID,urlstr)
{
msg='确认要删除该合同?这也将删除相关的合同明细和合同付款记录。';
if(window.confirm(msg))
{
URL="delete.php?CONTRACT_ID=" + CONTRACT_ID+"&"+urlstr+"&CUR_PAGE=<?=$CUR_PAGE?>&ORDERFIELD=<?=$ORDERFIELD?>&ORDERTYPE=<?=$ORDERTYPE?>";
window.location=URL;
}
}
function ad_query()
{
URL="ad_query";
window.location=URL;
}
function td_calendar(fieldname)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
function set_page(urlstr)
{
PAGE_START=PAGE_NUM.value;
location="index.php?CUR_PAGE="+PAGE_START+"&"+urlstr;
}
function check_all()
{
for (i=0;i<document.all("email_select").length;i++)
{
if(document.all("allbox").checked)
document.all("email_select").item(i).checked=true;
else
document.all("email_select").item(i).checked=false;
}
if(i==0)
{
if(document.all("allbox").checked)
document.all("email_select").checked=true;
else
document.all("email_select").checked=false;
}
}
function delete_mail(urlstr)
{
delete_str="";
for(i=0;i<document.all("email_select").length;i++)
{
el=document.all("email_select").item(i);
if(el.checked)
{ val=el.value;
delete_str+=val + ",";
}
}
if(i==0)
{
el=document.all("email_select");
if(el.checked)
{ val=el.value;
delete_str+=val + ",";
}
}
if(delete_str=="")
{
alert("请至少选择其中一个合同");
return;
}
msg='确认要删除所选合同?';
if(window.confirm(msg))
{
URL="delete.php?delete_str="+delete_str+"&"+urlstr+"&CUR_PAGE=<?=$CUR_PAGE?>&ORDERFIELD=<?=$ORDERFIELD?>&ORDERTYPE=<?=$ORDERTYPE?>";
window.location=URL;
}
}
</script>
</head>
<div align="left">
<fieldset style="width:95%;padding-bottom:5px;">
<legend class="small" align=left>
<b>快速查询</b>
</legend>
<table cellspacing="1" class="small" align="left" cellpadding="3">
<form action="index.php" method="post" name="form1">
<tr>
<td nowrap class="TableData"> 客户类别: </td>
<td nowrap class="TableData" >
<select name="KIND" class="SmallSelect">
<?
GETALLDATE("CRM_KIND");
?>
</select>
</td>
<td nowrap class="TableData">销售方式: </td>
<td nowrap class="TableData">
<select name="SELLMODE" class="SmallSelect">
<?
GETALLDATE("SELL_MODE");
?>
</select>
</td>
<td nowrap class="TableData">客户名称: </td>
<td nowrap class="TableData">
<input type="text" name="CUSTOMER_NAME" class="SmallInput" size="15" maxlength="100" value="<?=$CUSTOMER_NAME?>">
</td>
<td nowrap class="TableData">签约人(买方): </td>
<td nowrap class="TableData">
<input type="text" name="CONTRACT_LINKMAN1" class="SmallInput" size="10" maxlength="100" value="<?=$CONTRACT_LINKMAN1?>">
</td>
</tr>
<tr>
<td nowrap class="TableData"> 合同类型: </td>
<td nowrap class="TableData" >
<select name="CONTRACT_TYPE" class="SmallSelect">
<?
GETALLDATE("CONTRACT_TYPE");
?>
</select>
</td>
<td nowrap class="TableData">合同编号: </td>
<td nowrap class="TableData">
<input type="text" name="CONTRACT_NO" class="SmallInput" size="15" maxlength="100" value="<?=$CONTRACT_NO?>">
</td>
<td nowrap class="TableData">合同名称: </td>
<td nowrap class="TableData">
<input type="text" name="CONTRACT_NAME" class="SmallInput" size="15" maxlength="100" value="<?=$CONTRACT_NAME?>">
</td>
<td nowrap class="TableData">签约人(卖方): </td>
<td nowrap class="TableData">
<input type="text" name="CONTRACT_LINKMAN2" class="SmallInput" size="10" maxlength="100" value="<?=$CONTRACT_LINKMAN2?>">
</td>
</tr>
<tr>
<td nowrap class="TableData">
<select name="DATE_TYPE" class="SmallSelect">
<option value="BEGIN">生效日期</option>
<option value="END">终止日期</option>
<option value="CREATE">创建日期</option>
</select>
</td>
<td nowrap class="TableData" colspan="7">
<input type="text" name="DATE1" size="15" maxlength="10" class="SmallStatic" readonly value="<?=$BEGIN_DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.DATE1');">
至<input type="text" name="DATE2" size="15" maxlength="10" class="SmallStatic" readonly value="<?=$BEGIN_DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.DATE2');">
<input type="radio" name='SIGN' id='SIGN1' value="1"> <label for="SIGN1">款到合同</label><input type="radio" name='SIGN' id='SIGN2' value="0"> <label for="SIGN2">欠款合同</label>
</td>
</tr>
<tr>
<td nowrap class="TableData" colspan="3" >
<input value="快速查询" type="submit" class="SmallButton" title="快速查询" name="button">
<input value="高级查询" type="button" class="SmallButton" title="模糊查询" name="button1" onClick="ad_query();">
</td>
</tr>
</form>
</table>
</fieldset>
</div>
<br>
<br>
<?
//-----------先组织SQL语句-----------
if($CUSTOMER_NAME!="")
{
if($urlstr=="")$urlstr="CUSTOMER_NAME=".$CUSTOMER_NAME;
else $urlstr=$urlstr."&CUSTOMER_NAME=".$CUSTOMER_NAME;
if($WHERE_STR=="")
$WHERE_STR.=" where d.CUSTOMER_NAME like '%".$CUSTOMER_NAME."%'";
else
$WHERE_STR.=" and d.CUSTOMER_NAME like '%".$CUSTOMER_NAME."%'";
}
if($KIND!="")
{
if($urlstr=="")$urlstr="KIND=".$KIND;
else $urlstr=$urlstr."&KIND=".$KIND;
if($WHERE_STR=="")
$WHERE_STR.=" where d.KIND ='$KIND'";
else
$WHERE_STR.=" and d.KIND ='$KIND'";
}
if($SELLMODE!="")
{
if($urlstr=="")$urlstr="SELLMODE=".$SELLMODE;
else $urlstr=$urlstr."&SELLMODE=".$SELLMODE;
if($WHERE_STR=="")
$WHERE_STR.=" where d.SELLMODE ='$SELLMODE'";
else
$WHERE_STR.=" and d.SELLMODE ='$SELLMODE'";
}
if($CONTRACT_TYPE!="")
{
if($urlstr=="")$urlstr="CONTRACT_TYPE=".$CONTRACT_TYPE;
else $urlstr=$urlstr."&CONTRACT_TYPE=".$CONTRACT_TYPE;
if($WHERE_STR=="")
$WHERE_STR.=" where a.CONTRACT_TYPE ='$CONTRACT_TYPE'";
else
$WHERE_STR.=" and a.CONTRACT_TYPE ='$CONTRACT_TYPE'";
}
if($CONTRACT_NO!="")
{
if($urlstr=="")$urlstr="CONTRACT_NO=".$CONTRACT_NO;
else $urlstr=$urlstr."&CONTRACT_NO=".$CONTRACT_NO;
if($WHERE_STR=="")
$WHERE_STR.=" where a.CONTRACT_NO like '%".$CONTRACT_NO."%'";
else
$WHERE_STR.=" and a.CONTRACT_NO like '%".$CONTRACT_NO."%'";
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -