这几天一直在纠结如何在前台判断的问题,easyui 是异步进行查询 C标签用不到 无奈只能用小脚本判断,但是用小脚本判断,就只能自定义buttons和toolbar,在网上查了资料,如下所示
datagrid 自定义buttons
<table>
<tr><td>
//此table 在后台js写的前台仅仅是附加了自定义的buttons
<table id="listApply_list" toolbar="#toolbar" title="<%=sort0%><%=status0 %>" >
</table>
</td>
</tr>
</table>
<div id="toolbar">
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="get()">详情</a>
<%if(sort==9&&status==1){%>
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="easy()">easy</a>
<%} %>
</div>
自定义 toolbar
<div id="getAP" class="easyui-dialog" style="padding:10px; 700px;" align="center">
<table border="0" cellpadding="0" cellspacing="0" style="100%">
<tr>
<td width="100%">
<fieldset style="height:100%;">
<legend><%=sort0%><%=status0 %></legend>
<table border="0" cellpadding="5" cellspacing="1" style="100%" id="myTable">
<tr>
<td nowrap="nowrap" align="right" width="10%">申请:</td>
<td align="left"><%=sort0%></td>
</tr>
<tr>
<td> </td>
<td>
<%if(status==0){%>
<a href="#" class="easyui-linkbutton" iconcls="icon-ok" onclick="">通过</a>
<a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="">拒绝</a>
<%}else if(status==1&&sort==9){ %>
<a href="#" class="easyui-linkbutton" iconcls="icon-cancel" onclick="">打回</a>
<%} %>
<a href="#" class="easyui-linkbutton" onclick="javascript:$('#dd').dialog('close')">关闭</a>
</td>
</tr>
</table>
<br />
</fieldset>
</td>
</tr>
</table>
</div>