这次遇到的是问题是easyui打开的dialog子窗口怎么获取他的多个列值进行判断。
从后台接收到的多条列数据去决定另一条列数据的状态。
页面代码:
<th field="isleave" width="90" hidden = "true" >是否请假</th>
<th field="isjoined" width="30" hidden = "true" >签到时间</th>
<th field="isconfirm" width="30" hidden = "true">是否确认参加</th>
<th data-options="field:'mainshow',width:40,align:'center',formatter:formatState">状态</th>
<th data-options="field:'_operate',width:80,align:'center',formatter:formatOper">操作</th>
js:
function formatState(value, row, index) {
$('#mustJoin').datagrid('selectRow',index);
rows=$('#mustJoin').datagrid('getRows');//获取所有列
if(rows){
return row.isleave == '是' ? value = '请假'
: row.isconfirm == '是' ? value = "确认参加" : value = '未响应';
}
}