复制代码 代码如下:
<table>
<caption>
Material/Special Tool Rental/Tool Cantainer/Transportation/Mobile</caption>
<tbody><tr>
<td>
Project No
</td>
<td>
<input type="hidden">
<input type="text"><a href="javascript:void(0)">选择</a>
</td>
<td>
Final Custome:
</td>
<td>
<span>Label</span>
</td>
<td>
Order No.
</td>
<td>
<span>Label</span>
</td>
<td>
Project Leaing Time:
</td>
<td>
<span>Label</span>
</td>
</tr>
<tr>
<td colspan="8">
Exchange Rate:8.3000
</td>
</tr>
<tr>
<td>
item
</td>
<td colspan="2">
Description
</td>
<td>
QTY
</td>
<td>
Unit
</td>
<td>
Total
</td>
<td>
Remark
</td>
<td>
<a href="javascript:void(0)">NewItem</a>
</td>
</tr>
</tbody><tbody>
<tr>
<td>
</td>
<td colspan="2">
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr><td><select><option value="Material">Material</option><option value="Mobile">Mobile</option><option value="Others">Others</option><option value="SpecialToolRental">Special Tool Rental</option><option value="ToolContainer">Tool Container</option><option value="Transportation">Transportation</option><option value="WorkingHours">WorkingHours</option></select></td><td colspan="2"><input type="text"></td><td><input type="text"></td><td><input type="text"></td><td><input type="text"></td><td><input type="text"></td><td><a href="javascript:;SaveItem('tbItem1')">保存</a> | <a href="javascript:;DelItem('tbItem1')">删除</a> <input type="hidden"></td></tr></tbody>
</table>
复制代码 代码如下:
function SaveItem(index) {
var tr = $("tr[id=" + index + "]");
var innerid = tr.find('input[ID$=txtInnerID]').val();
var item = tr.find("select[id*=selItem]").val();
var des = tr.find('input[ID$=txtDescription]').val();
var qty = tr.find('input[ID$=txtQTY]').val();
var unit = tr.find('input[ID$=txtUnit]').val();
var total = tr.find('input[ID$=txtTotal]').val();
var remark = tr.find('input[ID$=txtRemark]').val();
//alert(innerid + "https://www.jb51.net/" + item + des + qty + unit + total + remark);
//验证项目编号
var proinnerid = $("#hidProjectInnerID").val();
if (proinnerid == "") {
$("#txtProjectNo").removeClass("Field");
$("#txtProjectNo").addClass("Error");
return false;
}
/*
jQuery.ajax({
type: 'get',
url: '../Handler/ProjectReport.ashx',
data: { "key": "save", "proinnerid": $("#hidProjectInnerID").val(), "innerid": innerid, "type": type, "content": content, "startdate": startdate, "enddate": enddate, "remark": remark },
cache: false,
success: function (result) {
var jsonobj = eval(result);
if (jsonobj[0].result == "true")
alert("Sueecss");
else
alert("Error");
}
});
*/
}
function DelItem(index) {
var tr = $("tr[id=" + index + "]");
//var innerid = tr.find('input[ID$=txtInnerID]').val();
$("tr[id=" + index + "]").remove();
}
您可能感兴趣的文章: