📄 index.php
字号:
document.form1.select1.add(my_option,i+2);
document.form1.select1.remove(i);
document.form1.select1.options(i+1).selected=true;
}
}
function exreport()
{
fld_str="";
fld_str1="";
if(document.form1.select1.options.length!=0)
{
for (i=0; i< document.form1.select1.options.length; i++)
{
options_value=document.form1.select1.options(i).value;
options_text=document.form1.select1.options(i).text;
fld_str+=options_value+",";
fld_str1+=options_text+",";
}
}
else
{
for (i=0; i< document.form1.select2.options.length; i++)
{
options_value=document.form1.select2.options(i).value;
options_text=document.form1.select2.options(i).text;
fld_str+=options_value+",";
fld_str1+=options_text+",";
}
}
document.form1.FIELDMSG.value=fld_str;
document.form1.FIELDMSGNAME.value=fld_str1;
document.form1.action="excel_report.php";
document.form1.submit();
}
function wordeport()
{
fld_str="";
fld_str1="";
if(document.form1.select1.options.length!=0)
{
for (i=0; i< document.form1.select1.options.length; i++)
{
options_value=document.form1.select1.options(i).value;
options_text=document.form1.select1.options(i).text;
fld_str+=options_value+",";
fld_str1+=options_text+",";
}
}
else
{
for (i=0; i< document.form1.select2.options.length; i++)
{
options_value=document.form1.select2.options(i).value;
options_text=document.form1.select2.options(i).text;
fld_str+=options_value+",";
fld_str1+=options_text+",";
}
}
document.form1.FIELDMSG.value=fld_str;
document.form1.FIELDMSGNAME.value=fld_str1;
document.form1.action="word_report.php";
document.form1.submit();
}
</script>
</head>
<div align="left">
<table cellspacing="1" class="small" align="left" cellpadding="3">
<form method="post" name="form1">
<tr>
<td nowrap class="TableHeader" colspan="8" align="left">
导出范围:
</td>
</tr>
<tr>
<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="CUSTOMER_CODE" class="SmallInput" size="15" maxlength="100" value="<?=$CUSTOMER_CODE?>">
</td>
<td nowrap class="TableData">客户简称: </td>
<td nowrap class="TableData">
<input type="text" name="CUSTOMER_SHORT" class="SmallInput" size="15" maxlength="100" value="<?=$CUSTOMER_SHORT?>">
</td>
<td nowrap class="TableData">地区: </td>
<td nowrap class="TableData" >
<select name="ARE" class="SmallSelect">
<?
GETALLDATE("AREACODE",$ARE);
?>
</select>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 客户类别: </td>
<td nowrap class="TableData" >
<select name="KIND" class="SmallSelect">
<?
GETALLDATE("KIND",$KIND);
?>
</select>
</td>
<td nowrap class="TableData">销售方式: </td>
<td nowrap class="TableData">
<select name="SELLMODE" class="SmallSelect">
<?
GETALLDATE("SELLMODE",$SELLMODE);
?>
</select>
</td>
<td nowrap class="TableData">行业属性: </td>
<td nowrap class="TableData">
<select name="ATTRIBUTE" class="SmallSelect">
<?
GETALLDATE("ATTRIBUTE",$ATTRIBUTE);
?>
</select>
</td>
<td nowrap class="TableData">企业性质: </td>
<td nowrap class="TableData" >
<select name="ENTERTYPE" class="SmallSelect">
<?
GETALLDATE("ENTERTYPE",$ENTERTYPE);
?>
</select>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 产品类别:</td>
<td nowrap class="TableData">
<select name="PRODUCT_MODE" class="SmallSelect">
<?
GETALLDATE("PRODUCT_MODE",$PRODUCT_MODE);
?>
</select>
</td>
<td nowrap class="TableData">产品名称: </td>
<td nowrap class="TableData">
<input type="text" name="PRODUCT_NAME" class="SmallInput" size="15" maxlength="100">
</td>
<td nowrap class="TableData">产品型号: </td>
<td nowrap class="TableData" colspan="3">
<input type="text" name="PRODUCT_TYPE" class="SmallInput" size="15" maxlength="100">
</td>
</tr>
</tr>
<tr>
<td nowrap class="TableData"> 服务名称: </td>
<td nowrap class="TableData">
<input type="text" name="SERVICE_NAME" class="SmallInput" size="15" maxlength="100">
</td>
<td nowrap class="TableData">服务描述: </td>
<td nowrap class="TableData" colspan="5">
<textarea cols=37 rows=1 name="SERVICE_DESC" class="SmallInput" wrap="yes"><?=$MEMO?></textarea>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 记录日期: </td>
<td nowrap class="TableData" colspan="3">
<input type="text" name="DATE1" size="15" maxlength="10" class="SmallStatic" readonly value="<?=$DATE1?>">
<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="<?=$DATE2?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.DATE2');">
<td nowrap class="TableData" colspan="3" >
</td>
</tr>
<tr>
<td nowrap class="TableHeader" colspan="8" align="left">
导出内容:
</td>
</tr>
<tr>
<td nowrap class="TableData" colspan="8" align="center">
<br>
<table width="150" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#000000" bordercolordark="#FFFFFF" class="small">
<tr bgcolor="#CCCCCC">
<td align="center">排序</td>
<td align="center"><b>显示字段</b></td>
<td align="center"> </td>
<td align="center" valign="top"><b>可选字段</b></td>
</tr>
<tr>
<td align="center" bgcolor="#999999">
<input type="button" class="SmallInput" value=" ↑ " onclick="func_up();">
<br><br>
<input type="button" class="SmallInput" value=" ↓ " onclick="func_down();">
</td>
<td valign="top" align="center" bgcolor="#CCCCCC">
<select name="select1" ondblclick="func_delete();" MULTIPLE style="width:200;height:280">
</select>
<input type="button" value=" 全 选 " onclick="func_select_all1();" class="SmallInput">
</td>
<td align="center" bgcolor="#999999">
<input type="button" class="SmallInput" value=" ← " onclick="func_insert();">
<br><br>
<input type="button" class="SmallInput" value=" → " onclick="func_delete();">
</td>
<td align="center" valign="top" bgcolor="#CCCCCC">
<select name="select2" ondblclick="func_insert();" MULTIPLE style="width:200;height:280">
<option value="CUSTOMER_NAME">客户名称</option>
<option value="PRODUCT_NAME">产品名称</option>
<option value="PRODUCT_CODE">产品编码</option>
<option value="SERVICE_NAME">服务名称</option>
<option value="SERVICE_CODE">服务编码</option>
<option value="DATE">记录日期</option>
<option value="PRICE">单价</option>
<option value="TOTAL_PRICE">总价</option>
<option value="SELLER">销售员</option>
</select>
<input type="button" value=" 全 选 " onclick="func_select_all2();" class="SmallInput">
</td>
</tr>
</table>
<br>
</td>
</tr>
<tr>
<td nowrap class="TableData" colspan="8" align="center" width="650">
<input value="EXCEL报表" type="button" class="SmallButton" title="EXCEL报表" name="button" onClick="exreport()">
<input value="WORD报表" type="button" class="SmallButton" title="WORD报表" name="button" onClick="wordeport()">
<input value="清空" type="button" class="SmallButton" title="清空" name="button" onclick="location='index.php'">
<input type="hidden" name="FIELDMSG">
<input type="hidden" name="FIELDMSGNAME">
</td>
</tr>
</table>
</div>
</body>
</html>
<?
function GETALLDATE($CODE)
{
global $connection;
$query = "SELECT * from SYS_CODE where PARENT_NO='$CODE'";
$connection=OpenConnection();
$cursor= exequery($connection,$query);
echo "<option value= ".">".""."</option>";
while($ROW=mysql_fetch_array($cursor))
{
$CODE_NO=$ROW["CODE_NO"];
$CODE_NAME=$ROW["CODE_NAME"];
echo "<option value=".$CODE_NO.">".$CODE_NAME."</option>";
}
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -