<td><input type="text" id="anchaid" name="" lay-verify="Country" autocomplete="off"
style="width: 120px; height: 25px;margin-left: 20px;"></td>
<td> <button type="submit" class="layui-btn layui-btn-warm layui-btn-radius"
style="width: 80px;height: 30px;" onclick="azchaxun()">
<p style="margin-top: -3px;color: black;font-weight: bold">查询</p></button></td>
</tr>
<tr> <td style="font-weight: bold">状态查询:</td>
<td><input type="text" id="zhuangtaicx" name="zcstate.state_name" lay-verify="Country" autocomplete="off"
style="width: 120px; height: 25px;margin-left: 20px;"></td>
</tr>
function azchaxun() {
$.ajax({
url:'/zd/ancha',
type:'POST',
dataType:'json',
data:{
zdid:$('#anchaid').val()
},
success:function (data) {
$("#tablebl").html("");
$("#tablebl").append("<tr><td>工单列表</td><td>类别状态</td></tr>");
$.each(data, function (i,n){
$("#tablebl").append("<tr><td style='border: 2px solid skyblue' width='150px'>"+n.zdid+"</td>" +
"<td style='border: 2px solid skyblue' width='150px'>"+ n.zcstate.state_name+"</td></tr>");
});
}
})
}