回车之后,增加一行的控制
[hcode]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://www.aixq.com/js/jquery.js"></script>
<style type="text/css">
<!--
input {
border: 1px solid #CCC;
margin: 2px;
height: 25px;
}
.noselected {
background-color: #FFF;
}
.selected {
background-color: #DFF9FF;
}
-->
</style>
<script type="text/javascript">
$(document).ready(function() {
});
function outNumBlur()
{
if (event.keyCode==13)//判断是否是回车键
{
$('#sendctrl').after($('#sendctrl').clone());
}
}
</script>
</head>
<body>
<br><br><br>
<table class="list box left bottom0" align="center" cellspacing="0" cellpadding="0" id="my_detail_body">
<tr>
<th>产品号</th>
<th>产品名称</th>
<th>箱数</th>
<th >每箱条数</th>
<th>单价</th>
<th>总条数</th>
<th>金额</th>
<th>折扣</th>
<th>折后金额</th>
<th >操作</th>
</tr>
<tbody id='append_div'>
<tr class="tr_insert" id="sendctrl">
<td >
<input type='hidden' value="" name='detail[p_id][]' size="3" valid='required' errmsg="请输入正确的产品号" onpropertychange="if(event.propertyName=='value'){getProInfo($(this).val(),$(this).parents('tr'));countFn(this);chkrepeatFn(this);chkstFn(this,'update');}" id='p_no[]_prikey' errid="er_pid_row_0" class="class_p_id" >
<input type="text" name="p_no[]" id="p_no[]" autocomplete="off" ondblclick=asDbShow("HDsdBDYSHCwNAkwNHUtCFQkfAQUYRBcCGRIFHQcSTBQsAg5GCgELC0xEUxgeCR4SAwNMExsOGANMAhEHAhAaHxNYXFNNOhg","",this,"","2") onkeyup=asKeyShow("HDsdBDYSHCwNAkwNHUtCFQkfAQUYRBcCGRIFHQcSTBQsAg5GCgELC0xEUxgeCR4SAwNMExsOGANMAhEHAhAaHxNYXFNNOhg","",this,"","2") value="" style=width:80px class="neverModules-input">
<a id='glass_test' href="javascript:;" onmouseover="sGs(this);" onmouseout="atClose();" ><img src="http://192.168.1.254/simple_erp1.1/core/template/default/images/atshow_ico.gif" border="0" width="17" height="16" ></a>
<span id='er_pid_row_0' class="red"></span>
</td>
<td style="padding-top:10px;line-height:15px;"><span id='p_name'></span></td>
<td>
<input type="text" id='quantity' name="detail[quantity][]" value="1" valid='required|isZInt' errmsg='请输入箱数|箱数必须大于零' errid="er_quantity_row_0" onchange="countFn(this);chkstFn(this,'update');showLostFn();" class="add_input"/>
<input name="er_qt[]" id="er_qt" value="0" type="hidden" valid='isYes' yesValue="0" errmsg='库存不足,无法完成销售' errid="er_qt_row_0" />
<span id='er_quantity_row_0' class="red"></span>
<span id='er_qt_row_0' class="red"></span>
</td>
<td >
<input type="text" id='capability' name="detail[capability][]" value="" valid='required|isZInt' errmsg='请输入每箱条数|每箱条数必须大于零' errid="er_capability_row_0" onchange="chkrepeatFn(this);countFn(this);chkstFn(this,'update');showLostFn();" class="add_input"/>
<input name="er_cap[]" id="er_cap" value="0" type="hidden" size="3" valid='isYes' yesValue="0" errmsg='请输入产品的正确规格' errid="er_cap_row_0" />
<input name="er_same[]" id="er_same" value="0" type="hidden" size="3" valid='isYes' yesValue="0" errmsg='不能重复输入相同规格的产品' errid="er_same_row_0" />
<span id='er_capability_row_0' class="red"></span>
<span id='er_same_row_0' class="red"></span>
<span id='er_cap_row_0' class="red"></span>
</td>
<td>
<input type="text" id='price' name="detail[price][]" value="" maxlength="12" valid='required|isNatMoney' errmsg='请输入单价|单价必须为货币类型' errid="er_price_row_0" onchange="countFn(this);showLostFn();" class="add_input"/>
<span id='er_price_row_0' class="red"></span>
</td>
<td> <span id='r_cap'/></span></td>
<td> <span id='r_pri'/></span></td>
<td>
<input name="detail[discount][]" type="text" class="add_input" id='discount' onblur="countFn(this);showLostFn();" onkeydown="outNumBlur()" onkeyup="if(!this.value.match(/^(100|\d{1,2})$/))this.value=''" maxlength="3" valid='isCzInt' errmsg='请输入正确的折扣' errid='er_discount_row_0' >%
<span id='er_discount_row_0'></span>
</td>
<td><span id="dicount_price"></span></td>
<td>
<input type="hidden" id='detail_id' name="detail[detail_id][]" value="">
<input type="hidden" id='org_cap' name="old_capability[]" value=""/>
<input type="hidden" id='org_qt' name="old_quantity[]" value=""/>
<a id="link_add" href="javascript:;" onclick="copyRow(this);return false;" >新增</a>
<a href="javascript:;" onclick="if(delRow(this)){};return false;" id='a_del' style="display:none">删除</a>
</td>
</tr>
</tbody>
</table>
<br><br><br>
<input name="rs_row_count" id="rs_row_count" value="1">
</body>
</html>
[/hcode]
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="http://www.aixq.com/js/jquery.js"></script>
<style type="text/css">
<!--
input {
border: 1px solid #CCC;
margin: 2px;
height: 25px;
}
.noselected {
background-color: #FFF;
}
.selected {
background-color: #DFF9FF;
}
-->
</style>
<script type="text/javascript">
$(document).ready(function() {
});
function outNumBlur()
{
if (event.keyCode==13)//判断是否是回车键
{
$('#sendctrl').after($('#sendctrl').clone());
}
}
</script>
</head>
<body>
<br><br><br>
<table class="list box left bottom0" align="center" cellspacing="0" cellpadding="0" id="my_detail_body">
<tr>
<th>产品号</th>
<th>产品名称</th>
<th>箱数</th>
<th >每箱条数</th>
<th>单价</th>
<th>总条数</th>
<th>金额</th>
<th>折扣</th>
<th>折后金额</th>
<th >操作</th>
</tr>
<tbody id='append_div'>
<tr class="tr_insert" id="sendctrl">
<td >
<input type='hidden' value="" name='detail[p_id][]' size="3" valid='required' errmsg="请输入正确的产品号" onpropertychange="if(event.propertyName=='value'){getProInfo($(this).val(),$(this).parents('tr'));countFn(this);chkrepeatFn(this);chkstFn(this,'update');}" id='p_no[]_prikey' errid="er_pid_row_0" class="class_p_id" >
<input type="text" name="p_no[]" id="p_no[]" autocomplete="off" ondblclick=asDbShow("HDsdBDYSHCwNAkwNHUtCFQkfAQUYRBcCGRIFHQcSTBQsAg5GCgELC0xEUxgeCR4SAwNMExsOGANMAhEHAhAaHxNYXFNNOhg","",this,"","2") onkeyup=asKeyShow("HDsdBDYSHCwNAkwNHUtCFQkfAQUYRBcCGRIFHQcSTBQsAg5GCgELC0xEUxgeCR4SAwNMExsOGANMAhEHAhAaHxNYXFNNOhg","",this,"","2") value="" style=width:80px class="neverModules-input">
<a id='glass_test' href="javascript:;" onmouseover="sGs(this);" onmouseout="atClose();" ><img src="http://192.168.1.254/simple_erp1.1/core/template/default/images/atshow_ico.gif" border="0" width="17" height="16" ></a>
<span id='er_pid_row_0' class="red"></span>
</td>
<td style="padding-top:10px;line-height:15px;"><span id='p_name'></span></td>
<td>
<input type="text" id='quantity' name="detail[quantity][]" value="1" valid='required|isZInt' errmsg='请输入箱数|箱数必须大于零' errid="er_quantity_row_0" onchange="countFn(this);chkstFn(this,'update');showLostFn();" class="add_input"/>
<input name="er_qt[]" id="er_qt" value="0" type="hidden" valid='isYes' yesValue="0" errmsg='库存不足,无法完成销售' errid="er_qt_row_0" />
<span id='er_quantity_row_0' class="red"></span>
<span id='er_qt_row_0' class="red"></span>
</td>
<td >
<input type="text" id='capability' name="detail[capability][]" value="" valid='required|isZInt' errmsg='请输入每箱条数|每箱条数必须大于零' errid="er_capability_row_0" onchange="chkrepeatFn(this);countFn(this);chkstFn(this,'update');showLostFn();" class="add_input"/>
<input name="er_cap[]" id="er_cap" value="0" type="hidden" size="3" valid='isYes' yesValue="0" errmsg='请输入产品的正确规格' errid="er_cap_row_0" />
<input name="er_same[]" id="er_same" value="0" type="hidden" size="3" valid='isYes' yesValue="0" errmsg='不能重复输入相同规格的产品' errid="er_same_row_0" />
<span id='er_capability_row_0' class="red"></span>
<span id='er_same_row_0' class="red"></span>
<span id='er_cap_row_0' class="red"></span>
</td>
<td>
<input type="text" id='price' name="detail[price][]" value="" maxlength="12" valid='required|isNatMoney' errmsg='请输入单价|单价必须为货币类型' errid="er_price_row_0" onchange="countFn(this);showLostFn();" class="add_input"/>
<span id='er_price_row_0' class="red"></span>
</td>
<td> <span id='r_cap'/></span></td>
<td> <span id='r_pri'/></span></td>
<td>
<input name="detail[discount][]" type="text" class="add_input" id='discount' onblur="countFn(this);showLostFn();" onkeydown="outNumBlur()" onkeyup="if(!this.value.match(/^(100|\d{1,2})$/))this.value=''" maxlength="3" valid='isCzInt' errmsg='请输入正确的折扣' errid='er_discount_row_0' >%
<span id='er_discount_row_0'></span>
</td>
<td><span id="dicount_price"></span></td>
<td>
<input type="hidden" id='detail_id' name="detail[detail_id][]" value="">
<input type="hidden" id='org_cap' name="old_capability[]" value=""/>
<input type="hidden" id='org_qt' name="old_quantity[]" value=""/>
<a id="link_add" href="javascript:;" onclick="copyRow(this);return false;" >新增</a>
<a href="javascript:;" onclick="if(delRow(this)){};return false;" id='a_del' style="display:none">删除</a>
</td>
</tr>
</tbody>
</table>
<br><br><br>
<input name="rs_row_count" id="rs_row_count" value="1">
</body>
</html>
[/hcode]
社会文化站
2009/07/24 12:51
我来顶一下,多发文章就好。
求医网
2009/07/22 17:21
虽然看不太懂,但我会努力的。
Else replied on 2009/07/22 20:55
好久没有人回复我的blog了,谢谢
Pages: 1/1
1
1
杨过其实是郭靖的亲生儿子
Don't to talk about for the fourth time
