<!--{template tttuangou_header}-->
<script language="javascript">
var price;
var oncemax;
var surplusnum;
price={$product['nowprice']};
oncemax={$product['oncemax']};
surplusnum={$surplusnum};
$(document).ready(function(){
$("#num").keyup( function() {
if(surplusnum<oncemax){
oncemax=surplusnum;
}
if($('#num').val()<=0){
alert('错误，购买数量必须大于等于1');
$('#num').val(1);
}
if(isNaN($('#num').val())){
alert('错误，数量必须是一个数字');
$('#num').val(1);
}
if(oncemax != 0 && oncemax < $('#num').val()){
alert('对不起,您最多购买'+oncemax+'个商品');
$('#num').val(oncemax);
}
$("#price").html($('#num').val()*price);
$("#price2").html($('#num').val()*price);
});
});
</script>
<div class="m960">
<div class="t_l">
<div class="t_area_out">
<div class="t_area_in">
<p class="cur_title">提交订单</p>
<div class="sect">
<form action="{$action}" method="post" enctype="multipart/form-data">
<table id="report">
<tr>
<th>团购项目</th>
<th>数量</th>
<th>&nbsp;</th>
<th>价格</th>
<th>&nbsp;</th>
<th>总价</th>
</tr>
<tr class="Bor">
<td width="35%">{$product['name']}</td>
<td width="10%"><input type="text" name="num" id="num" value="{$editnum}" maxlength="4" class="input_text f_input2"></td>
<td width="4%">x</td>
<td width="12%">&yen; {$product['nowprice']}</td>
<td width="4%">=</td>
<td width="15%"><span class="B">&yen; <span id='price2'>{$product['nowprice']}</span></span></td>
</tr>
</table>
<div class="nleftL"><span class="SR B R">应付总额：&yen; <span id='price'>{$product['nowprice']}</span></span></div>
<div class="nleftL">
<input type="hidden" value="{$id}" name="id" />
<input type="submit" value="确认无误，购买" name="buy" class="formbutton">  	
</div>
</form>
</div>
</div>
</div>
</div>
<div class="t_r">
<!--{template "tttuangou_myfinder"}-->
</div>
</div>
<!--{template tttuangou_footer}-->