EasyUI datagrid 行编辑
一、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(" 上传完成");
$('#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) + " 修改用时:" + 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) + " 修改用时:" + 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 行编辑的更多相关文章
- 关于EasyUI DataGrid行编辑时嵌入时间控件
本人做一个名为“安徽中控”项目时,为快速开发基础数据增删改模块,遂采用EasyUIDatagrid将所有增删改查的操作都集中于表格中,并且所有增删改查操作都集中于泛型对象,从而不必为每个表写具体的增删 ...
- easyui datagrid 行编辑功能
datagrid现在具有行编辑能力了,使用时只须在columns中为需要编辑的列添加一个editor属性,编辑保存时同时具有数据校验能力. 看一个例子效果图: 代码如下: $('#tt').datag ...
- easyui datagrid行编辑中数据联动
easyui的datagrid中行内编辑使用数据联动.即:当编辑产品编号时,该行的产品名称自动根据产品编号显示出来. 在编辑中获取当前行的索引 function getRowIndex(target) ...
- easyui datagrid 批量编辑和提交数据
easyui datagrid 行编辑和提交方,废话就不多说了,直接上代码 <div style="margin: 5px;"> <table id=" ...
- Jquery easyui开启行编辑模式增删改操作
Jquery easyui开启行编辑模式增删改操作 Jquery easyui开启行编辑模式增删改操作先上图 Html代码: <table id="dd"> </ ...
- [转]Jquery easyui开启行编辑模式增删改操作
本文转自:http://www.cnblogs.com/nyzhai/archive/2013/05/14/3077152.html Jquery easyui开启行编辑模式增删改操作先上图 Html ...
- easyui datagrid行合并
easyui datagrid行合并 合并方法 /** * EasyUI DataGrid根据字段动态合并单元格 * 参数 tableID 要合并table的id * 参数 colList 要合并的列 ...
- Easyui datagrid行内【添加】、【编辑】、【上移】、【下移】
前几天项目中遇到一个需求用到了Easyui datagrd行内添加和编辑数据,同时对行内数据上移下移,所以对这几个功能做个总结. 1.首先大概说下这几个功能里用到的主要方法,行内添加数据主要是添加列的 ...
- ASP.NET MVC5+EF6+EasyUI 后台管理系统(83)-Easyui Datagrid 行内编辑扩展
这次我们要从复杂的交互入手来说明一些用法,这才能让系统做出更加复杂的业务,上一节讲述了Datagird的批量编辑和提交本节主要演示扩展Datagrid行内编辑的属性,下面来看一个例子,我开启编辑行的时 ...
随机推荐
- 与webview打交道中踩过的那些坑
随着HTML5被越来越多的用到web APP的开发当中,webview这一个神器便日渐凸显出重要地位.简要的说,webview能够在移动应用中开辟出一个窗口,在里面显示html页面,css以及js代码 ...
- 一天一小段js代码(no.2)
(一)可以用下面js代码来检测弹出窗口是否被屏蔽: var blocked = false ; try { /*window.open()方法接受4个参数window.open(要加载的url,窗口目 ...
- C#最良心脚本语言C#Light/Evil,Xamarin\WP8\Unity热更新最良心方案,再次进化.
C#Light的定位是嵌入式脚本语言,一段C#Light脚本是一个函数 C#Evil定位为书写项目的脚本语言,多脚本文件合作,可以完全用脚本承载项目. C#Light/Evil 使用完全C#一致性语法 ...
- IOS 多线程05-OperationQueue 、GCD详解
注:本人是翻译过来,并且加上本人的一点见解. 1. 开始 目前在 iOS中有两套先进的同步 API 可供我们使用:操作队列OperationQueue和 GCD .其中 GCD 是基于 C 的底层 ...
- CSS的两个小知识点 伪类选择器和display:table-cell
li:first-child {color:red} li:nth-child(3n) {color: red} 在对nth-child传参的时候,已经直接用公式,3n就表示3的倍数.多用伪类和伪元素 ...
- PHP-CS-Fixer:格式化你的PHP代码
简介 良好的代码规范可以提高代码可读性,团队沟通维护成本.最推荐大家遵守的是 php-fig(PHP Framework Interop Group) 组织定义的 PSR-1 . PSR-2 两个.不 ...
- 360路由器刷openwrt后设置wifi中继
上一篇文章(360路由器刷openwrt.不死uboot.双系统 .wifi中继 - 飞鸿影~ - 博客园)讲了如何在360路由器C301上安装openwrt以及安装双系统.这篇文章讲如何设置无线中继 ...
- [数据库事务与锁]详解五: MySQL中的行级锁,表级锁,页级锁
注明: 本文转载自http://www.hollischuang.com/archives/914 在计算机科学中,锁是在执行多线程时用于强行限制资源访问的同步机制,即用于在并发控制中保证对互斥要求的 ...
- Django的Model上都有些什么
Django的Model上都有些什么 modelinfo= ['DoesNotExist', 'MultipleObjectsReturned', '__class__', '__delattr__' ...
- APP性能测试
方法一: 本地安装安卓模拟器,用LR选择模拟器录制方式录制 方法二: 手机真机需要root,可以在电脑上下载一键root工具(如卓大师),然后手机和电脑用数据线连接,然后root. 在手机上运行 Mo ...