编程php信息
id分别是ishijian1,ishijian2,语句是
echo ' ';
?>
<code><td valign="top" style="width:903; "> <table border="0" cellspacing="1" cellpadding="1" align="center"> <tr> <td title="格式:8位数字 示例:20131231默认搜索当前三个月内的订单要搜索之前的订单请修改或清空本项"> <p align="center">起始时间</p> <table border="0" cellspacing="1" cellpadding="1" align="center"> <tr> <td title="格式:8位数字 示例:20131231默认搜索当前三个月内的订单要搜索之前的订单请修改或清空本项"><p align="center">起始时间</p></td> <td title="格式:8位数字 示例:20131231默认搜索当前三个月内的订单要搜索之前的订单请修改或清空本项" width="165"></td> </tr> <tr> <td title="格式:8位数字 示例:20140115"><p align="center">截止时间<br></p></td> <td title="格式:8位数字 示例:20140115"></td> <td><p align="center"> </p></td> </tr> </table> </td> <td title="格式:8位数字 示例:20131231默认搜索当前三个月内的订单要搜索之前的订单请修改或清空本项" width="165"></td> </tr> <tr> <td title="格式:8位数字 示例:20140115"> <p align="center">截止时间</p> <p><br></p> </td> <td title="格式:8位数字 示例:20140115"></td> <td><p align="center"> </p></td> </tr> </table> <br><p></p> <p><br><br><br>c_huizong.php<br><?php <br>//订单查询</p>if ($_POST['1shijian1'])<p>{<br>echo "<br>document.getElementById('1shijian1').value='".$_POST['1shijian1'].<br>"';document.getElementById('1shijian2').value='".$_POST['1shijian2'].<br>"';cg1name();";<br><br>if ($_POST['1shijian1']NULL)</p>$shijian1=" and COPTC.TC003>=".$_POST['1shijian1'];<p>else<br>$shijian1="";<br><br>if ($_POST['1shijian2']NULL)</p>$shijian2=" and COPTC.TC003else$shijian2="";<p><br>require_once('i_code/connect.php');<br><br>$query="select leixing,xifen,sewen,ddgm,bztdb,daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007<br>FROM chaxun<br>LEFT JOIN DDTJMX ON MA003=leixing and xifen=XIFEN AND sewen=DDTJMX.UDF10 AND ddgm=DDGM and daba=XINGHAO <br>left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002 <br>where xifen'' and xifen'5050' and TC003>='20150110' AND TC003GROUP BY leixing,xifen,sewen,ddgm,bztdb,daba<br>union all<br>select leixing,xifen,null as sewen,null as ddgm,bztdb,null as daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007<br>FROM chaxun<br>LEFT JOIN DDTJMX ON MA003=leixing and xifen=XIFEN <br>left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002 <br>where xifen='5050' and TC003>='20150110' AND TC003GROUP BY leixing,xifen,bztdb<br>union all <br>select leixing,null as xifen,null as sewen,null as ddgm,bztdb, null as daba,SUM(TD008) AS TD008,SUM(TA015)TA015,SUM(RKZS)RKZS,SUM(D310)D310,SUM(D305)D305,SUM(D304)D304,SUM(D3023)D3023,SUM(TH008)TH008,SUM(TJ007)TJ007<br>FROM chaxun<br>LEFT JOIN DDTJMX ON MA003=leixing</p>left join COPTC on TC001=DDTJMX.TD001 AND TC002=DDTJMX.TD002 <p>where xifen='' and TC003>='20150110' AND TC003GROUP BY leixing,bztdb".$shijian1.$shijian2;<br><br>$result=mssql_query($query);<br>$row_num=mssql_num_rows($result);</p>if ($row_num0)<p>{</p>echo "<table align="center" cellspacing="0" cellpadding="0"> <br><tr align="center">";<br>echo "<th>类别</th>;<br><th>细分</th>;<br><th>色温</th>;<br><th>订单规模</th>;<br><th>标准投单比</th>;<br><th>打靶</th>;<br><th>订单量</th>;<br><th>预计产量</th>;<br><th>总入库数</th>;<br><th>标准入库</th>;<br><th>销货数量</th>;<br><th>销退数量</th>;<br><th>跟踪信息</th>;<br> </tr>";<p>while($row=mssql_fetch_assoc($result))<br>{<br> echo"</p> <tr align="center">";<p>echo"</p> <td>".$row['leixing']."</td>";<br> echo"<td>".$row['xifen']."</td>";<br> echo"<td>".$row['sewen']."</td>";<br> echo"<td>".$row['ddgm']."</td>";<br> echo"<td>".$row['bztdb']."</td>";<br> echo"<td>".$row['daba']."</td>";<br> echo"<td>".number_format($row['TD008'],0)."</td>";<br> echo"<td>".number_format($row['TA015'],0)."</td>";<br> echo"<td>".number_format($row['RKZS'],0)."</td>";<br> echo"<td>".number_format($row['D310'],0)."</td>";<br> echo"<td>".number_format($row['TH008'],0)."</td>";<br> echo"<td>".number_format($row['TJ007'],0)."</td>";<br> echo"<td>跟踪信息</td>";<br> //跟踪信息<pre class="brush:php;toolbar:false"><code>echo"</code>
}
echo"
类别 | ;细分 | ;色温 | ;订单规模 | ;标准投单比 | ;打靶 | ;订单量 | ;预计产量 | ;总入库数 | ;标准入库 | ;销货数量 | ;销退数量 | ;跟踪信息 | ;
---|---|---|---|---|---|---|---|---|---|---|---|---|
".$row['leixing']." | "; echo"".$row['xifen']." | "; echo"".$row['sewen']." | "; echo"".$row['ddgm']." | "; echo"".$row['bztdb']." | "; echo"".$row['daba']." | "; echo"".number_format($row['TD008'],0)." | "; echo"".number_format($row['TA015'],0)." | "; echo"".number_format($row['RKZS'],0)." | "; echo"".number_format($row['D310'],0)." | "; echo"".number_format($row['TH008'],0)." | "; echo"".number_format($row['TJ007'],0)." | "; echo"跟踪信息 | "; //跟踪信息}echo"