一、HTML:

<div class="info">
<div class="info_tt">
<span class="info_tt1">明细</span> <span class="pucker2"></span><a class="del" onclick="detailDel()"
href="javascript:void(0)">删除</a> <a class="sure" onclick="detailOK()" href="javascript:void(0)">
确认</a> <a class="add" onclick="detailAdd()" href="javascript:void(0)">添加</a>
</div>
<div>
<table id="detailList">
</table>
</div>
</div>

二、JS:

<script type="text/javascript">
$(function () {
//使用JavaScript创建数据表格
$('#detailList').datagrid({
url: '/PMP/EntryNoticeManage/GetDetailList', //一个用以从远程站点请求数据的超链接地址。控制器/方法
queryParams: {
type: 1,
entryNoticeId: 0,
proTaskId: 0
},
iconCls: 'icon-save',
loadMsg: '数据正在加载中,请稍后.....', //当从远程站点载入数据时,显示的一条快捷信息。
singleSelect: true, //设置为true将只允许选择一行
fitColumns: true, //设置为true将自动使列适应表格宽度以防止出现水平滚动
striped: true, //设置为true将交替显示行背景
pagination: false, //设置true将在数据表格底部显示分页工具栏。
rownumbers: true, //设置为true将显示行数。
pagePosition: 'bottom', //定义的分页栏的位置。可用的值有 'top','bottom','both'。
sortName: 'creatTime', //当数据表格初始化时以哪一列来排序。
sortOrder: 'desc', //定义排序顺序,可以是'asc'或者'desc'(正序或者倒序)。
idField: 'Id', //表明该列是一个唯一列。
onClickRow: detailClickRow,
frozenColumns: [[ //跟列属性一样,但是这些列固定在左边,不会滚动。 ]],
columns: [[
{ field: 'Id', title: 'ID', hidden: true },
{ field: 'ProtastDetId', title: 'ProtastDetId', hidden: true },
{ field: 'WorkContent', title: '工作内容', width: 100, align: 'center', sortable: true,
editor: { type: 'textbox', options: { validType: 'length[1,50]', required: true} }
},
{ field: 'Remarks', title: '备注', width: 100, align: 'center', sortable: true,
editor: { type: 'textbox', options: { validType: 'length[0,500]'} }
}
]]
}); //end datagrid loadgrid(1, "@entryNotice.Id", 0); }); //明细编辑行索引
var detailEditIndex = undefined; //明细结束编辑
function detailEndEdit() {
if (detailEditIndex == undefined) { return true }
if ($('#detailList').datagrid('validateRow', detailEditIndex)) {
$('#detailList').datagrid('endEdit', detailEditIndex);
detailEditIndex = undefined;
return true;
} else {
return false;
}
} //明细点击行
function detailClickRow(index) {
if (detailEditIndex != index) {
if (detailEndEdit()) {
$('#detailList').datagrid('selectRow', index)
.datagrid('beginEdit', index);
detailEditIndex = index;
} else {
$('#detailList').datagrid('selectRow', detailEditIndex);
}
}
} //添加行
function detailAdd() {
if (detailEndEdit()) {
$('#detailList').datagrid('appendRow', {});
detailEditIndex = $('#detailList').datagrid('getRows').length - 1;
$('#detailList').datagrid('selectRow', detailEditIndex)
.datagrid('beginEdit', detailEditIndex);
}
} //删除行
function detailDel() {
if (detailEditIndex == undefined) { return }
$('#detailList').datagrid('cancelEdit', detailEditIndex)
.datagrid('deleteRow', detailEditIndex);
detailEditIndex = undefined;
} //临时保存
function detailOK() {
if (detailEndEdit()) {
$('#detailList').datagrid('acceptChanges');
}
} //重新查询,显示第一页
function loadgrid(type, entryNoticeId, proTaskId) {
$('#detailList').datagrid('load', {
type: type,
entryNoticeId: entryNoticeId,
proTaskId: proTaskId
});
$('#detailList').datagrid('clearSelections');
}
</script>

三、完整示例页面:

@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
@using Model.Suya;
@using Suya.PMP.Contract.Model;
@{
BeforeAllocationModel beforeAllocation = ViewData["BeforeAllocationModel"] as BeforeAllocationModel;
}
<link href="/Content/Plugins/UploadifyJs/uploadify.css" rel="stylesheet" type="text/css" />
<script src="/Content/Plugins/UploadifyJs/swfobject.js" type="text/javascript"></script>
<script src="/Content/Plugins/UploadifyJs/jquery.uploadify-3.1.min.js" type="text/javascript"></script>
<link href="/Content/Styles/css1/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
//使用JavaScript创建数据表格
$('#checkList').datagrid({
url: '/PMP/BeforeAllocationManage/GetCheckList', //一个用以从远程站点请求数据的超链接地址。控制器/方法
queryParams: {
parentId: "@beforeAllocation.id"
},
iconCls: 'icon-save',
loadMsg: '数据正在加载中,请稍后.....', //当从远程站点载入数据时,显示的一条快捷信息。
singleSelect: true, //设置为true将只允许选择一行
fitColumns: true, //设置为true将自动使列适应表格宽度以防止出现水平滚动
striped: true, //设置为true将交替显示行背景
pagination: false, //设置true将在数据表格底部显示分页工具栏。
rownumbers: true, //设置为true将显示行数。
sortName: 'creatTime', //当数据表格初始化时以哪一列来排序。
sortOrder: 'desc', //定义排序顺序,可以是'asc'或者'desc'(正序或者倒序)。
idField: 'Id', //表明该列是一个唯一列。
onClickRow: checkClickRow,
onLoadSuccess: function (data) {
calCheckTotal(data.rows);
},
frozenColumns: [[ //跟列属性一样,但是这些列固定在左边,不会滚动。 ]],
columns: [[
{ field: 'id', title: 'ID', hidden: true },
{ field: 'checkTime', title: '校对时间', width: 100, align: 'center', sortable: true,
formatter: dateformatter,
editor: { type: 'datetimebox', options: { parser: dateparser, required: true} }
},
{ field: 'baackTime', title: '返回时间', width: 100, align: 'center', sortable: true,
formatter: dateformatter,
editor: { type: 'datetimebox', options: { parser: dateparser, required: true} }
},
{ field: 'useTime', title: '校对用时', width: 100, align: 'center', sortable: true,
editor: { type: 'numberbox', options: { min: 0, precision: 2, required: true} }
},
{ field: 'correctTime', title: '修改用时', width: 100, align: 'center', sortable: true,
editor: { type: 'numberbox', options: { min: 0, precision: 2, required: true} }
}
]]
}); //end datagrid $('#auditList').datagrid({
url: '/PMP/BeforeAllocationManage/GetAuditList', //一个用以从远程站点请求数据的超链接地址。控制器/方法
queryParams: {
parentId: "@beforeAllocation.id"
},
iconCls: 'icon-save',
loadMsg: '数据正在加载中,请稍后.....', //当从远程站点载入数据时,显示的一条快捷信息。
singleSelect: true, //设置为true将只允许选择一行
fitColumns: true, //设置为true将自动使列适应表格宽度以防止出现水平滚动
striped: true, //设置为true将交替显示行背景
pagination: false, //设置true将在数据表格底部显示分页工具栏。
rownumbers: true, //设置为true将显示行数。
sortName: 'creatTime', //当数据表格初始化时以哪一列来排序。
sortOrder: 'desc', //定义排序顺序,可以是'asc'或者'desc'(正序或者倒序)。
idField: 'Id', //表明该列是一个唯一列。
onClickRow: auditClickRow,
onLoadSuccess: function (data) {
calAuditTotal(data.rows);
},
frozenColumns: [[ //跟列属性一样,但是这些列固定在左边,不会滚动。 ]],
columns: [[
{ field: 'Id', title: 'ID', hidden: true },
{ field: 'checkTime', title: '校对时间', width: 100, align: 'center', sortable: true,
formatter: dateformatter,
editor: { type: 'datetimebox', options: { parser: dateparser, required: true} }
},
{ field: 'baackTime', title: '返回时间', width: 100, align: 'center', sortable: true,
formatter: dateformatter,
editor: { type: 'datetimebox', options: { parser: dateparser, required: true} }
},
{ field: 'useTime', title: '校对用时', width: 100, align: 'center', sortable: true,
editor: { type: 'numberbox', options: { min: 0, precision: 2, required: true} }
},
{ field: 'correctTime', title: '修改用时', width: 100, align: 'center', sortable: true,
editor: { type: 'numberbox', options: { min: 0, precision: 2, required: true} }
}
]]
}); //end datagrid $('#fileList').datagrid({
url: '/PMP/BeforeAllocationManage/GetAttList', //一个用以从远程站点请求数据的超链接地址。控制器/方法
queryParams: {
parentId: "@beforeAllocation.id"
},
iconCls: 'icon-save',
loadMsg: '数据正在加载中,请稍后.....', //当从远程站点载入数据时,显示的一条快捷信息。
singleSelect: true, //设置为true将只允许选择一行
fitColumns: true, //设置为true将自动使列适应表格宽度以防止出现水平滚动
striped: true, //设置为true将交替显示行背景
pagination: false, //设置true将在数据表格底部显示分页工具栏。
rownumbers: true, //设置为true将显示行数。
sortName: 'creatTime', //当数据表格初始化时以哪一列来排序。
sortOrder: 'desc', //定义排序顺序,可以是'asc'或者'desc'(正序或者倒序)。
idField: 'Id', //表明该列是一个唯一列。
frozenColumns: [[ //跟列属性一样,但是这些列固定在左边,不会滚动。 ]],
columns: [[
{ field: 'Id', title: 'ID', hidden: true },
{ field: 'attachment', title: 'attachment', hidden: true },
{ field: 'fileName', title: '附件', width: 100, align: 'center', sortable: true,
formatter: function (value, row, index) {
return '<a href="DownloadFile?name=' + escape(value) + '&url=' + row.attachment + '" target="_blank">' + value + '</a>';
}
},
{ field: 'uploadTime', title: '上传时间', width: 100, align: 'center', sortable: true, formatter: dateformatter },
{ field: 'operate', title: '操作', width: 100, align: 'center', sortable: true,
formatter: function (value, row, index) {
return '<a href="javascript:void(0);" onclick="delFile(' + index + ')">删除</a>';
}
}
]]
}); //end datagrid //验证信息
jQuery("#frm").validate({
//定义验证规则
rules: {
beforeBillCode: {
required: true
},
taskType: {
required: true
},
desingContent: {
required: true,
maxlength: 500
},
desingerShow: {
required: true
},
checkerShow: {
required: true
},
auditorShow: {
required: true
},
confirmPersonShow: {
required: true
},
auditorScore: {
number: true
},
score: {
number: true
},
needTime: {
number: true
},
factTime: {
number: true
}
},
//定义提示信息
messages: {
beforeBillCode: {
required: "必填"
},
taskType: {
required: "必填"
},
desingContent: {
required: "必填",
maxlength: "长度不超过500"
},
desingerShow: {
required: "必填"
},
checkerShow: {
required: "必填"
},
auditorShow: {
required: "必填"
},
confirmPersonShow: {
required: "必填"
},
auditorScore: {
number: "数字"
},
score: {
number: "数字"
},
needTime: {
number: "数字"
},
factTime: {
number: "数字"
}
},
submitHandler: function (form) {
//点提交时调用更新方法
btnAdd();
}
}); $("#uploadify").uploadify({
height: 25,
width: 100,
swf: '/Content/Plugins/UploadifyJs/uploadify.swf',
uploader: '/PMP/BeforeAllocationManage/UploadFile',
buttonText: '选择文件上传',
fileSizeLimit: '4MB',
fileTypeDesc: '文件',
fileTypeExts: '*.*',
multi: true,
onUploadSuccess: function (fileObj, data, response) {
var d = eval("(" + data + ")");
$(".uploadify-queue-item").find(".data").html("&nbsp;&nbsp;上传完成");
$('#fileList').datagrid("appendRow", {
fileName: d.name,
attachment: d.url,
uploadTime: new Date()
});
},
onUploadError: function (event, ID, fileObj, errorObj) {
if (event.size > 4 * 1024 * 1024) {
alert('超过文件上传大小限制(4M)!');
return;
}
alert('上传失败');
}
}); //end uploadify }); //end $.ready //合计
function calCheckTotal(rows) {
var sum1 = 0;
var sum2 = 0;
for (var i = 0; i < rows.length; i++) {
sum1 += parseFloat(rows[i].useTime);
sum2 += parseFloat(rows[i].correctTime);
}
$("#checkTotal").html("合计:校对用时:" + sum1.toFixed(2) + "&nbsp;&nbsp;修改用时:" + sum2.toFixed(2));
} //合计
function calAuditTotal(rows) {
var sum1 = 0;
var sum2 = 0;
for (var i = 0; i < rows.length; i++) {
sum1 += parseFloat(rows[i].useTime);
sum2 += parseFloat(rows[i].correctTime);
}
$("#auditTotal").html("合计:审核用时:" + sum1.toFixed(2) + "&nbsp;&nbsp;修改用时:" + sum2.toFixed(2));
} //删除附件
function delFile(index) {
$("#fileList").datagrid('deleteRow', index);
} //日期格式
function dateformatter(value) {
if (!value) return "";
if (value instanceof Date) {
return value.format("yyyy-MM-dd hh:mm");
}
else if (value.indexOf("Date") != -1) {
var date = new Date();
date.setTime(value.replace(/\/Date\((-?\d+)\)\//, '$1'));
return date.format("yyyy-MM-dd hh:mm");
}
else if ($.trim(value) != "") {
var date = new Date(value.replace(/-/g, '/'));
return date.format("yyyy-MM-dd hh:mm");
}
} //日期格式
function dateparser(value) {
if (!value) return new Date();
if (value.indexOf("Date") != -1) {
var date = new Date();
date.setTime(value.replace(/\/Date\((-?\d+)\)\//, '$1'));
return date;
}
else {
var arr = value.split(' ');
var arr1 = arr[0].split('-');
var arr2 = arr[1].split(':');
var y = parseInt(arr1[0], 10);
var M = parseInt(arr1[1], 10);
var d = parseInt(arr1[2], 10);
var h = parseInt(arr2[0], 10);
var m = parseInt(arr2[1], 10);
if (!isNaN(y) && !isNaN(M) && !isNaN(d) && !isNaN(h) && !isNaN(m)) {
return new Date(y, M - 1, d, h, m);
} else {
return new Date();
}
}
} //添加
function btnAdd() {
var params = FormToJson($("#frm").serializeArray());
var att = $("#fileList").datagrid('getRows');
var check = $("#checkList").datagrid('getRows');
var audit = $("#auditList").datagrid('getRows'); $.ajax({
url: "/PMP/BeforeAllocationManage/InsertOrUpdate",
type: "POST",
dataType: "json",
data: { params: params, att: JSON2.stringify(att), check: JSON2.stringify(check), audit: JSON2.stringify(audit) },
success: function (data) {
if (fnet.ajax.success(data)) {
fnet.msg.info("保存成功");
back();
}
else {
fnet.msg.error(data.msg);
}
}
});
} //保存
function save() {
if (checkEndEdit() && auditEndEdit()) {
$("#frm").submit();
}
else {
fnet.msg.info("请先保存校对记录和审核记录");
}
} //返回
function back() {
parent.$('#ttTab').tabs('select', "项目前期任务分配考核表");
var tab = parent.$('#ttTab').tabs('getSelected');
tab.find("iframe").contents().find("#btnSearch").click();
parent.$("#ttTab").tabs('close', '修改项目前期任务分配考核表');
} //选择项目前期任务单
function selBeforeProtast() {
$.iDialog({
title: '选择项目前期任务单',
height: "500px",
width: "800px",
content: "url:/Auth/BeforeProtastDialog/Index",
okVal: "确认选择",
ok: function () {
return this.content.doOK(function (data) {
$("#beforeBillCode").val(data.BeforeBillCode);
$("#projectCode").val(data.ProjectCode);
$("#projectName").val(data.ProjectName);
$("#productCodeShow").html(data.ProjectCode);
if (data.Attachment) {
var pos = data.Attachment.lastIndexOf('/');
var len = data.Attachment.length - pos;
var name = data.Attachment.substr(pos + 1, len);
$("#attachment").html(name);
$("#attachment").attr("href", "DownloadFile?name=" + escape(name) + "&url=" + escape(data.Attachment));
}
}); //调用子窗口的函数
}
});
} //选择人员
function selemp(id) {
$.iDialog({
title: '选择人员',
height: "500px",
width: "800px",
content: "url:/HR/EmployeeManage/SelEmployee",
okVal: "确认选择",
ok: function () {
return this.content.doOK(function (data) {
$("#" + id).val(data.EmployeeName);
$("#" + id + "+ input").val(data.EmployeeCode);
}); //调用子窗口的函数
}
});
} // checkList操作开始 ===================================================================================
//编辑行索引
var checkEditIndex = undefined; //结束编辑
function checkEndEdit() {
if (checkEditIndex == undefined) { return true }
if ($('#checkList').datagrid('validateRow', checkEditIndex)) {
$('#checkList').datagrid('endEdit', checkEditIndex);
checkEditIndex = undefined;
var rows = $('#checkList').datagrid('getRows');
calCheckTotal(rows);
return true;
} else {
return false;
}
} //点击行
function checkClickRow(index) {
if (checkEditIndex != index) {
if (checkEndEdit()) {
$('#checkList').datagrid('selectRow', index)
.datagrid('beginEdit', index);
checkEditIndex = index;
} else {
$('#checkList').datagrid('selectRow', checkEditIndex);
}
}
} //添加行
function checkAdd() {
if (checkEndEdit()) {
$('#checkList').datagrid('appendRow', {});
checkEditIndex = $('#checkList').datagrid('getRows').length - 1;
$('#checkList').datagrid('selectRow', checkEditIndex)
.datagrid('beginEdit', checkEditIndex);
}
} //删除行
function checkDel() {
if (checkEditIndex == undefined) { return }
$('#checkList').datagrid('cancelEdit', checkEditIndex)
.datagrid('deleteRow', checkEditIndex);
checkEditIndex = undefined;
} //临时保存
function checkOK() {
if (checkEndEdit()) {
$('#checkList').datagrid('acceptChanges');
}
} //重新查询,显示第一页
function loadcheckgrid(type, entryNoticeId, proTaskId) {
$('#checkList').datagrid('load', {
type: type,
entryNoticeId: entryNoticeId,
proTaskId: proTaskId
});
$('#checkList').datagrid('clearSelections');
}
// checkList操作结束 =================================================================================== // auditList操作开始 ===================================================================================
//编辑行索引
var auditEditIndex = undefined; //结束编辑
function auditEndEdit() {
if (auditEditIndex == undefined) { return true }
if ($('#auditList').datagrid('validateRow', auditEditIndex)) {
$('#auditList').datagrid('endEdit', auditEditIndex);
auditEditIndex = undefined;
var rows = $('#checkList').datagrid('getRows');
calAuditTotal(rows);
return true;
} else {
return false;
}
} //点击行
function auditClickRow(index) {
if (auditEditIndex != index) {
if (auditEndEdit()) {
$('#auditList').datagrid('selectRow', index)
.datagrid('beginEdit', index);
auditEditIndex = index;
} else {
$('#auditList').datagrid('selectRow', auditEditIndex);
}
}
} //添加行
function auditAdd() {
if (auditEndEdit()) {
$('#auditList').datagrid('appendRow', {});
auditEditIndex = $('#auditList').datagrid('getRows').length - 1;
$('#auditList').datagrid('selectRow', auditEditIndex)
.datagrid('beginEdit', auditEditIndex);
}
} //删除行
function auditDel() {
if (auditEditIndex == undefined) { return }
$('#auditList').datagrid('cancelEdit', auditEditIndex)
.datagrid('deleteRow', auditEditIndex);
auditEditIndex = undefined;
} //临时保存
function auditOK() {
if (auditEndEdit()) {
$('#auditList').datagrid('acceptChanges');
}
} //重新查询,显示第一页
function loadauditgrid(type, entryNoticeId, proTaskId) {
$('#auditList').datagrid('load', {
type: type,
entryNoticeId: entryNoticeId,
proTaskId: proTaskId
});
$('#auditList').datagrid('clearSelections');
}
// auditList操作结束 ===================================================================================
</script>
<form id="frm" action="">
<div class="label">
<input type="button" class="submit_btn" value="保存" onclick="save()" style="float: right;" />
<input type="button" class="submit_btn" value="返回" onclick="back()" style="float: right;" />
</div>
<div class="info" style="margin-top: 37px;">
<div class="info_tt">
<span class="info_tt1">基础信息</span>(带<i class="red"> * </i>号项必填) <span class="pucker2">
</span>
</div>
<div class="info_con" style="padding-top: 5px;">
<table width="100%" border="0" bgcolor="#f9f7f7" cellspacing="1" cellpadding="1">
<tr>
<td class="txt_right">
单号:
</td>
<td class="txt_left">
<input type="hidden" name="id" value="@beforeAllocation.id" />
<input type="hidden" class="xinxi_txt" id="billCode" name="billCode" value="@beforeAllocation.billCode" />
<span>@beforeAllocation.billCode</span>
</td>
<td class="txt_right">
</td>
<td class="txt_left">
</td>
</tr>
<tr>
<td class="txt_right">
制单人:
</td>
<td class="txt_left">
<input type="hidden" class="xinxi_txt" id="billCreator" name="billCreator" value="@ViewBag.employeeCode" />
<span>@ViewBag.employeeName</span>
</td>
<td class="txt_right">
制单时间:
</td>
<td class="txt_left">
<input type="hidden" class="xinxi_txt" id="billDate" name="billDate" value="@DateTime.Now.ToString("yyyy-MM-dd HH:mm")" />
<span>@DateTime.Now.ToString("yyyy-MM-dd HH:mm")</span>
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>项目前期任务单:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="beforeBillCode" name="beforeBillCode" value="@beforeAllocation.beforeBillCode" readonly="readonly"
onclick="selBeforeProtast()" />
<input type="hidden" id="projectCode" name="projectCode" value="@(beforeAllocation.ProjectInfo == null ? "" : beforeAllocation.ProjectInfo.billCode)" />
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selBeforeProtast()"
data-options="iconCls:'icon-search'">选择</a>
</td>
<td class="txt_right">
项目名称:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="projectName" name="projectName" value="@(beforeAllocation.ProjectInfo == null ? "" : beforeAllocation.ProjectInfo.projectName)" readonly="readonly"
disabled="disabled" />
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>任务类型:
</td>
<td class="txt_left">
<select id="taskType" name="taskType" editable="false" style="width: 153px" class="xueli">
<option value=""></option>
<option value="0" @(beforeAllocation.taskType == "0" ? "selected='selected'" : "") >
载荷图</option>
<option value="1" @(beforeAllocation.taskType == "1" ? "selected='selected'" : "") >
方案图</option>
<option value="2" @(beforeAllocation.taskType == "2" ? "selected='selected'" : "") >
工程量统计</option>
<option value="3" @(beforeAllocation.taskType == "3" ? "selected='selected'" : "") >
载荷图与工程量统计</option>
</select>
</td>
<td class="txt_right">
提资附件:
</td>
<td class="txt_left">
@{
string attachmentName = "";
string attachmentHref = "";
if (beforeAllocation.BeforeProtast != null && !string.IsNullOrWhiteSpace(beforeAllocation.BeforeProtast.attachment))
{
int pos = beforeAllocation.BeforeProtast.attachment.LastIndexOf('/');
int len = beforeAllocation.BeforeProtast.attachment.Length - pos - 1;
attachmentName = beforeAllocation.BeforeProtast.attachment.Substring(pos + 1, len);
attachmentHref = "DownloadFile?name=" + Server.UrlEncode(attachmentName) + "&url=" + Server.UrlEncode(beforeAllocation.BeforeProtast.attachment);
}
}
<a id="attachment" href="@attachmentHref" target="_blank">@attachmentName</a>
</td>
</tr>
<tr>
<td class="txt_right">
任务内容附件上传:
</td>
<td class="txt_left" colspan="3">
<table id="fileList" style="width: 90%;">
</table>
<input type="file" id="uploadify" name="uploadify" style="width: 400px;" />
</td>
</tr>
<tr>
<td class="txt_right">
暂停原因:
</td>
<td class="txt_left" colspan="3">
<textarea type="text" class="xinxi_txt" id="stopReason" name="stopReason" style="width: 90%;">@beforeAllocation.stopReason</textarea>
</td>
</tr>
<tr>
<td class="txt_right">
暂停时间:
</td>
<td class="txt_left" colspan="3">
<input type="text" class="xinxi_txt" id="stopTime" name="stopTime" value="@(beforeAllocation.stopTime.HasValue ? beforeAllocation.stopTime.Value.ToString("yyyy-MM-dd HH:mm") : "")" readonly="readonly"
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'1900-01-01'})" value="" />
</td>
</tr>
<tr>
<td class="txt_right">
备注:
</td>
<td class="txt_left" colspan="3">
<textarea class="xinxi_txt" id="remark" name="remark" style="width: 90%;">@beforeAllocation.remark</textarea>
</td>
</tr>
</table>
</div>
<div class="info">
<div class="info_tt">
<span class="info_tt1">审核评分</span>(带<i class="red"> * </i>号项必填) <span class="pucker2">
</span>
</div>
<div class="info_con" style="padding-top: 5px;">
<table width="100%" border="0" bgcolor="#f9f7f7" cellspacing="1" cellpadding="1">
<tr>
<td class="txt_right">
<i class="red">*</i>项目编号:
</td>
<td class="txt_left" colspan="3">
<span id="productCodeShow">@(beforeAllocation.ProjectInfo == null ? "" : beforeAllocation.ProjectInfo.billCode)</span>
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>设计内容:
</td>
<td class="txt_left" colspan="3">
<textarea class="xinxi_txt" id="desingContent" name="desingContent" style="width: 90%;">@beforeAllocation.desingContent</textarea>
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>设计人:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="desinger" name="desingerShow" value="@(beforeAllocation.Desinger == null ? "" : beforeAllocation.Desinger.name)" readonly="readonly" />
<input type="hidden" name="desinger" value= "@(beforeAllocation.Desinger == null ? "" : beforeAllocation.Desinger.employeeCode)"/>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selemp('desinger')"
data-options="iconCls:'icon-search'">选择</a>
</td>
<td class="txt_right">
<i class="red">*</i>校对人:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="checker" name="checkerShow" value="@(beforeAllocation.Checker == null ? "" : beforeAllocation.Checker.name)" readonly="readonly" />
<input type="hidden" name="checker" value="@(beforeAllocation.Checker == null ? "" : beforeAllocation.Checker.employeeCode)" />
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selemp('checker')"
data-options="iconCls:'icon-search'">选择</a>
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>审核人:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="auditor" name="auditorShow" value="@(beforeAllocation.Auditor == null ? "" : beforeAllocation.Auditor.name)" readonly="readonly" />
<input type="hidden" name="auditor" value="@(beforeAllocation.Auditor == null ? "" : beforeAllocation.Auditor.employeeCode)"/>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selemp('auditor')"
data-options="iconCls:'icon-search'">选择</a>
</td>
<td class="txt_right">
<i class="red">*</i>审核人打分:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="auditorScore" name="auditorScore" value="@beforeAllocation.auditorScore" />
</td>
</tr>
<tr>
<td class="txt_right">
<i class="red">*</i>审定人:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="confirmPerson" name="confirmPersonShow"
value="@(beforeAllocation.ConfirmPerson == null ? "" : beforeAllocation.ConfirmPerson.name)" readonly="readonly" />
<input type="hidden" name="confirmPerson" value="@(beforeAllocation.ConfirmPerson == null ? "" : beforeAllocation.ConfirmPerson.employeeCode)" />
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="selemp('confirmPerson')"
data-options="iconCls:'icon-search'">选择</a>
</td>
<td class="txt_right">
</td>
<td class="txt_left">
</td>
</tr>
<tr>
<td class="txt_right">
任务开始时间:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="startDate" name="startDate" readonly="readonly"
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'1900-01-01'})" value="@(beforeAllocation.startDate.HasValue ? beforeAllocation.startDate.Value.ToString("yyyy-MM-dd HH:mm") : "")" />
</td>
<td class="txt_right">
任务结束时间:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="endDate" name="endDate" readonly="readonly"
onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm',minDate:'1900-01-01'})" value="@(beforeAllocation.endDate.HasValue ? beforeAllocation.endDate.Value.ToString("yyyy-MM-dd HH:mm") : "")" />
</td>
</tr>
<tr>
<td class="txt_right">
要求用时:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="needTime" name="needTime" value="@beforeAllocation.needTime" />
</td>
<td class="txt_right">
实际用时:
</td>
<td class="txt_left">
<input type="text" class="xinxi_txt" id="factTime" name="factTime" value="@beforeAllocation.factTime"/>
</td>
</tr>
<tr>
<td class="txt_right">
评分:
</td>
<td class="txt_left" colspan="3">
<input type="text" class="xinxi_txt" id="score" name="score" value="@beforeAllocation.score" />
</td>
</tr>
<tr>
<td class="txt_right">
备注:
</td>
<td class="txt_left" colspan="3">
<textarea class="xinxi_txt" id="scoreRemark" name="scoreRemark" style="width: 90%;">@beforeAllocation.scoreRemark</textarea>
</td>
</tr>
</table>
</div>
</div>
<div class="info">
<div class="info_tt">
<span class="info_tt1">校对记录</span>(带<i class="red"> * </i>号项必填) <span class="pucker2">
</span><a class="del" onclick="checkDel()" href="javascript:void(0)">删除</a> <a class="sure"
onclick="checkOK()" href="javascript:void(0)">确认</a> <a class="add" onclick="checkAdd()"
href="javascript:void(0)">添加</a>
</div>
<div class="info_con" style="padding: 0;">
<table id="checkList">
</table>
<div id="checkTotal" style="padding: 5px; text-align: right;">
</div>
</div>
</div>
<div class="info">
<div class="info_tt">
<span class="info_tt1">审核记录</span>(带<i class="red"> * </i>号项必填) <span class="pucker2">
</span><a class="del" onclick="auditDel()" href="javascript:void(0)">删除</a> <a class="sure"
onclick="auditOK()" href="javascript:void(0)">确认</a> <a class="add" onclick="auditAdd()"
href="javascript:void(0)">添加</a>
</div>
<div class="info_con" style="padding: 0;">
<table id="auditList">
</table>
<div id="auditTotal" style="padding: 5px; text-align: right;">
</div>
</div>
</div>
</div>
</form>

EasyUI datagrid 行编辑的更多相关文章

  1. 关于EasyUI DataGrid行编辑时嵌入时间控件

    本人做一个名为“安徽中控”项目时,为快速开发基础数据增删改模块,遂采用EasyUIDatagrid将所有增删改查的操作都集中于表格中,并且所有增删改查操作都集中于泛型对象,从而不必为每个表写具体的增删 ...

  2. easyui datagrid 行编辑功能

    datagrid现在具有行编辑能力了,使用时只须在columns中为需要编辑的列添加一个editor属性,编辑保存时同时具有数据校验能力. 看一个例子效果图: 代码如下: $('#tt').datag ...

  3. easyui datagrid行编辑中数据联动

    easyui的datagrid中行内编辑使用数据联动.即:当编辑产品编号时,该行的产品名称自动根据产品编号显示出来. 在编辑中获取当前行的索引 function getRowIndex(target) ...

  4. easyui datagrid 批量编辑和提交数据

    easyui datagrid 行编辑和提交方,废话就不多说了,直接上代码 <div style="margin: 5px;"> <table id=" ...

  5. Jquery easyui开启行编辑模式增删改操作

    Jquery easyui开启行编辑模式增删改操作 Jquery easyui开启行编辑模式增删改操作先上图 Html代码: <table id="dd"> </ ...

  6. [转]Jquery easyui开启行编辑模式增删改操作

    本文转自:http://www.cnblogs.com/nyzhai/archive/2013/05/14/3077152.html Jquery easyui开启行编辑模式增删改操作先上图 Html ...

  7. easyui datagrid行合并

    easyui datagrid行合并 合并方法 /** * EasyUI DataGrid根据字段动态合并单元格 * 参数 tableID 要合并table的id * 参数 colList 要合并的列 ...

  8. Easyui datagrid行内【添加】、【编辑】、【上移】、【下移】

    前几天项目中遇到一个需求用到了Easyui datagrd行内添加和编辑数据,同时对行内数据上移下移,所以对这几个功能做个总结. 1.首先大概说下这几个功能里用到的主要方法,行内添加数据主要是添加列的 ...

  9. ASP.NET MVC5+EF6+EasyUI 后台管理系统(83)-Easyui Datagrid 行内编辑扩展

    这次我们要从复杂的交互入手来说明一些用法,这才能让系统做出更加复杂的业务,上一节讲述了Datagird的批量编辑和提交本节主要演示扩展Datagrid行内编辑的属性,下面来看一个例子,我开启编辑行的时 ...

随机推荐

  1. Android和Linux应用综合对比分析

    原文地址:http://www.cnblogs.com/beer/p/3325242.html 免责声明: 当时写完这篇调查报告,给同事看了后,他觉得蛮喜欢,然后想把这篇文章修改一下,然后往期刊上发表 ...

  2. 冲刺阶段 day13

    ---恢复内容开始--- 项目进展 今天星期三,我们将专业管理部分又继续做了完善,之前漏掉的几项功也一一补全,没能实现的数据库部分也已经进行了完善,并且对已经完成的部分进行了检测,数据库的部分还有待进 ...

  3. Android Studio 1.0.2项目实战——从一个APP的开发过程认识Android Studio

    Android Studio 1.0.1刚刚发布不久,谷歌紧接着发布了Android Studio 1.0.2版本,和1.0.0一样,是一个Bug修复版本.在上一篇Android Studio 1.0 ...

  4. [异常解决] JTAG 与STM32的SWD连接接线方式

    如果我们的板子上只留了4个接口:V3.3,SWDIO,SWDCLK,GND.那么和JTAG的连接关系参见下图: dd400cf22b5c01e57a6c9e198d5383a0_189.jpg (0 ...

  5. Winform文件下载之WinINet

    在C#中,除了webclient我们还可以使用一组WindowsAPI来完成下载任务.这就是Windows Internet,简称 WinINet.本文通过一个demo来介绍WinINet的基本用法和 ...

  6. C++ std::multiset

    std::multiset template < class T, // multiset::key_type/value_type class Compare = less<T>, ...

  7. 汇编 int10h(转)

    原文:http://www.cnblogs.com/magic-cube/archive/2011/10/19/2217676.html INT 10H 是由 BIOS 对屏幕及显示器所提供的服务程序 ...

  8. Canvas 内部元素添加事件处理

    目录 前言 自定义事件 有序数组 元素父类 事件判断 其他 立即执行函数 apply, call, bind addEventListener 传参 调用父类的构造函数 对象检测 isPointInP ...

  9. Java程序员的日常 —— 注册工厂的妙用

    注册工厂是一种很常用的框架书写方法,它适合于快速创建相同类型的对象. 举个栗子 比如一个家具工厂,有沙发.椅子.茶几等等,正常的编程模式是这样的: //创建 class 沙发{} class 椅子{} ...

  10. SqlServer与MySql的一些常用用法的差别

    最近学习了一下mySql,总结一下SqlServer不同一些用法: 操作符优先级以下列表显示了操作符优先级的由低到高的顺序.排列在同一行的操作符具有相同的优先级.:=||, OR, XOR&& ...