In easyui formatter: {add deletion method function (value, row, index)

 

 

 

{
field : 'abj',
title : '操作',
align : 'center',
resizable:false,
width:'10%',
formatter: function (value, row,index) {
html = "<a href='javascript:;' onclick='deleteMessage("+row.message_number+","+row.approval_status+")'>删除</a>";
return html
}
}

 

js code

// list Delete button
function deleteMessage (message_number, approval_status) {
IF (approval_status == 2) {
$ .messager.show ({
title: 'prompt',
msg: '! Deleted by the approval does not allow',
ShowType: 'Show'
});
return;
}
$ .post ( '<% =% the basePath> xyData / Platform / deletePlatformMessage.do message_number is =?' + message_number is,
function (Result) {
$ .messager.show ({
title: 'tips ',
MSG: result.msg,
ShowType:' Show '
});
$ (' # platformMessageTable '.) DataGrid (' reload '); // User Data The reload
},' JSON ');

}

 

 

2.

formatter: function (value, row,index) {
var html;
if(value=='0'){
html = "<input type='button' class='button_in_table' onclick='changeTriggerFlag(\""+ row.sur_id +"\","+1+","+index+")' value='患者调查'>" +
"<input type='button' class='button_in_table' onclick='changeTriggerFlag(\""+row.sur_id+"\","+2+","+index+")' value='置为无效'>"
}
return html;
}

Guess you like

Origin www.cnblogs.com/xianz666/p/12149622.html