一开始我以为很难,仔细梳理前人写的代码,单个领取功能已经实现,故而我在页面,添加一个按钮,并且在未领取的单子前添加上添加复选框。
一键领取按钮: <button type="button" onclick="reciveAll()" class="btn btn-primary ml10">一键领取</button>
添加复选框 js代码添加(已经领取的派单前面不需要加复选框):
{
label: '<input type="checkbox" id="J_ctrlAllCheck" />',
name: 'ctrl',
width: '5%',
formatter: function(cellvalue, options, rowObject) {
if(rowObject.status == "0001"){
return '<input type="checkbox" name="taskId" value="' + rowObject.taskId + '"/>';
}else{
&nb