|
|
@@ -20,6 +20,23 @@ var bootstrap = function ($, learun) { |
|
|
|
$('#lr_refresh').on('click', function () { |
|
|
|
location.reload(); |
|
|
|
}); |
|
|
|
|
|
|
|
// 编辑 |
|
|
|
$('#lr_edit').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('fid'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
learun.layerForm({ |
|
|
|
id: 'form', |
|
|
|
title: '编辑', |
|
|
|
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue, |
|
|
|
width: 600, |
|
|
|
height: 400, |
|
|
|
callBack: function (id) { |
|
|
|
return top[id].acceptClick(refreshGirdData); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
// 查看 |
|
|
|
$('#lr_view').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('fid'); |
|
|
@@ -52,6 +69,25 @@ var bootstrap = function ($, learun) { |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
//删除 |
|
|
|
$('#lr_delete').on('click', function () { |
|
|
|
var keyValue = $('#gridtable').jfGridValue('Id'); |
|
|
|
if (learun.checkrow(keyValue)) { |
|
|
|
var Status = $('#gridtable').jfGridValue('Status'); |
|
|
|
if (Status == 1) { |
|
|
|
return learun.alert.warning('该项已提交,不可删除!'); |
|
|
|
} |
|
|
|
learun.layerConfirm('是否确认删除该项!', function (res) { |
|
|
|
if (res) { |
|
|
|
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/QualityReport/DeleteForm', { keyValue: keyValue }, function () { |
|
|
|
refreshGirdData(); |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 打印 |
|
|
|
$('#lr_print').on('click', function () { |
|
|
|
$('#gridtable').jqprintTable(); |
|
|
|