@@ -22,15 +22,20 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
var mainId = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交,不可编辑!');
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue,
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue + '&mainId=' + mainId ,
width: 600,
height: 400,
callBack: function (id) {
@@ -42,11 +47,12 @@ var bootstrap = function ($, learun) {
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
var mainId = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '查看',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/FormView?keyValue=' + keyValue,
url: top.$.rootUrl + '/LR_Desktop/QualityReport/FormView?keyValue=' + keyValue + '&mainId=' + mainId ,
width: 600,
height: 400,
btn: null
@@ -71,7 +77,7 @@ var bootstrap = function ($, learun) {
});
}
});
//撤回
$('#lr_nosubmit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
@@ -106,7 +112,7 @@ var bootstrap = function ($, learun) {
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
@@ -151,7 +157,10 @@ var bootstrap = function ($, learun) {
label: "公式计算结果", name: "Result", width: 150, align: "left"
},
{
label: "填报时间", name: "ReportTime", width: 150, align: "left"
label: "填报时间", name: "ReportTime", width: 150, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM');
}
},
{
label: "状态", name: "Status", width: 150, align: "left",
@@ -167,7 +176,9 @@ var bootstrap = function ($, learun) {
},
],
mainId: 'Id',
isPage: true
isPage: true,
sidx: 'ReportTime',
sord: 'DESC',
});
page.search();
},