{load(fhead)}
<body class="mainbg">
	<div id="mainhearder"><span>您的位置：<a href="{$vd['root']}index.php?m=mod_b2b&c=Dealer&a=home">经销商管理系统</a> >> 财务管理 >> 销售提成报表查询</span></div>
	<div id="hearder"><span>销售提成报表查询</span></div>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<form name="sellhistory" method="get" action="index.php">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table1">
		<!--$vhistory=$vd['ishistory']==1?0:1;if($vd['hashistory'] == 1){-->
  	<tr>
      <td width="22%" class="tableleft1">
        &nbsp;
      </td>
      <td width="78%" align="left" class="tableright1">
      	<input type="hidden" name="ishistory" value="{$vd['ishistory']}" />
        <a href="index.php?m=mod_agent&c=trade&tpl=profit&tradetype=11&ishistory={$vhistory}"><font color="#ff0000"><u><!--if($vd['ishistory']==0){-->历史数据查询<!--}else{-->回到当前数据查询<!--}--></u></font></a>
      </td>
    </tr>
    <!--}-->

		<tr>
		<td width="22%" class="tableleft1">关键字：</td>
		<td width="78%" align="left" class="tableright1"><input type="text" size="30" name="keywords" class='input' value=""></td>
		</tr>
		<tr>
		<td class="tableleft1">查询条件：</td>
		<td align="left" class="tableright1">
		<select name="stype">
		<option value="content">商品名称</option>
		<option value="otherside">下属编号</option>
		</select>
		</td>
		</tr>
		<tr>
		<td class="tableleft1">查询时间段：</td>
		<td align="left" class="tableright1">
    <input type="text" name="startdate" value="{$vd['startdate']}" class="input" id="startdate"/>
    <strong>至</strong>&nbsp;<input type="text" name="enddate" value="{$vd['enddate']}" class="input" id="enddate"/>
    </td>
		</tr>
		<tr>
		<td class="tableleft1">&nbsp;</td>
		<td align="left" class="tableright1">
			<input type="hidden" name="m" value="mod_agent"/>
	    <input type="hidden" name="c" value="trade"/>
	    <input type="hidden" name="tpl" value="profit"/>
	    <input type="hidden" name="tradetype" value="11"/>
			<input type="submit" name="Submit222" value="确认查询" class="button"> <input type="reset" name="reset" value="重置查询" class="button"></td>
		</tr>
		</table>
		</form>
	</td>
	</tr>
	</table>
	<br>
	<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
	<tr>
	<td class="tableleft">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="table">
		<tr>
		<td width="10%" class="heardertop1">提成时间</td>
		<td width="18%" class="heardertop1">购买商品</td>
		<td width="8%" class="heardertop1">下属商户</td>
		<td width="8%" class="heardertop1">变化后({$vd['lang']['moneyunit']})</td>
		<td width="8%" class="heardertop1">下级价格</td>
		<td width="6%" class="heardertop1">数量</td>
		<td width="8%" class="heardertop1">我的进价</td>
		<td width="8%" class="heardertop1">单价提成</td>
		<td width="8%" class="heardertop1">订单提成</td>
		<td width="18%" class="heardertop1">订单号</td>
		</tr>
		<!--$income=0;$outcome=0;foreach($vd['items'] as $item) {-->
		<tr class="stline" onmouseover="this.className='nd'" onmouseout="this.className='stline'">
		<td>{$item['createdate']}</td>
		<td>{$item['content']}</td>
		<td>{$item['otherside']}</td>
		<td><font color="#ff0000">{$item['fat']}</font></td>
		<td>{$item['listprice']}&nbsp;</td>
		<td>{$item['qty']}&nbsp;</td>
		<td>{$item['price']}&nbsp;</td>
		<td><!--echo $item['listprice'] - $item['price'];--></td>
		<td><!--echo round($item['income'], 3);--></td>
		<td>{$item['ordno']}</td>
		</tr>
		<!--$income=$income+$item['income'];$outcome=$outcome+$item['outcome'];}-->
		<tr class="thr">
      <td align="center" colspan="3">本页统计</td>
      <td align="center" colspan="7">提成金额 <font color="#ff0000"><!--echo round($income, 3);--></font> {$vd['lang']['moneyunit']}</td>
    </tr>
    <tr class="thr">
      <td align="center" colspan="3">查询统计</td>
      <td align="center" colspan="7">提成金额 <font color="#ff0000"><!--echo round($vd['record']['income'], 3);--></font> {$vd['lang']['moneyunit']}</td>
    </tr>
		</table>
	</td>
	</tr>
	</table>
	<div id="page" align="right">
		{load(fpage)}
	</div>
	
</body>
</html>
