bug
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -129,11 +129,17 @@
|
||||
};
|
||||
var deletesFun = function () {
|
||||
var checkedItems = $("#table").bootstrapTable('getSelections');
|
||||
var datas = "";
|
||||
var ids = [];
|
||||
var staffIds = [];
|
||||
$.each(checkedItems, function (index, item) {
|
||||
datas += item.id + ",";
|
||||
if (item.id) {
|
||||
ids.push(item.id);
|
||||
} else if (item.staffId) {
|
||||
// 兼容模式:若后续行模型提供备用ID,批删也可工作
|
||||
staffIds.push(item.staffId);
|
||||
}
|
||||
});
|
||||
if (datas == "") {
|
||||
if (ids.length === 0 && staffIds.length === 0) {
|
||||
showAlert('d', '请先选择记录', 'mainAlertdiv');
|
||||
} else {
|
||||
swal({
|
||||
@ -157,7 +163,10 @@
|
||||
}
|
||||
}).then(function (willDelete) {
|
||||
if (willDelete) {
|
||||
$.post(ext.contextPath + '/safety/internalCertificate/deletes.do', {ids: datas}, function (data) {
|
||||
$.post(ext.contextPath + '/safety/internalCertificate/deletes.do', {
|
||||
ids: ids.join(","),
|
||||
staffIds: staffIds.join(",")
|
||||
}, function (data) {
|
||||
if (data > 0) {
|
||||
$("#table").bootstrapTable('refresh');
|
||||
// 初始化 作业类型
|
||||
@ -313,17 +322,17 @@
|
||||
field: 'jobType', // 返回json数据中的name
|
||||
title: '作业类型', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'issuingAuthority', // 返回json数据中的name
|
||||
title: '发证机构', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'issueDate', // 返回json数据中的name
|
||||
title: '领证时间', // 表格表头显示文字
|
||||
align: 'center', // 左右居中
|
||||
valign: 'middle', // 上下居中
|
||||
valign: 'middle' // 上下居中
|
||||
}, {
|
||||
field: 'expirationDate', // 返回json数据中的name
|
||||
title: '有效期至', // 表格表头显示文字
|
||||
|
||||
Reference in New Issue
Block a user