<table class="layui-table" id="test">
<button type="button" id="selectFun" class="layui-btn layui-btn-danger" style="height: 31px;/* width: 31px; */line-height: 0px;" >查询</button>
var tableIns = table.render({
elem: '#test'
,url:'/getImageList.do'
,cols: [
[
{field:'PATIENT_NAME',width:80, title: '姓名'}
,{field:'SEX', width:80, title: '性别'}
,{field:'AGE', width:80, title: '年龄'}
,{field:'EXAM_PARTS', title: '项目'}
,{field:'PATIENT_ID',title: 'ID'}
,{field:'SHENQINGDH', title: '单号'}
,{field:'UPLOAD_TIME',title: '时间', sort: true}
,{field:'SYSTEM_TYPE', title: '类型'}
,{field:'INTER_TYPE', title: '信息'}
,{field:'SUCCESSED', width:80, title: '状态'}
,{field:'ERROR_MSG', title: '上传信息'}
]
]
,page: true,
limit: 100,
limits: [200,400,800]
});
$('#selectFun').on('click', function(){
var name= $("#name").val();
var shenqingdh= $("#shenqingdh").val();
var patientId= $("#patientId").val();
var uploadTime1= $("#uploadTime1").val();
var uploadTime2= $("#uploadTime2").val();
var systemType= $("#systemType").val();
var systemTypeOff= $("#systemTypeOff").val();
if(name==""&&shenqingdh=="" &&patientId==""&&uploadTime1==""&&uploadTime2==""&&(systemType==""||systemType==null)&&(systemTypeOff==""||systemTypeOff==null)){
layer.msg("请填写信息")
return;
}
if(uploadTime1!=""&&uploadTime2==""){
layer.msg("请填写结束时间")
return;
}
if(uploadTime2!=""&&uploadTime1==""){
layer.msg("请填写开始时间")
return;
}
tableIns.reload({
where: {
name:name,
shenqingdh: shenqingdh,
patientId: patientId,
uploadTime1: uploadTime1,
uploadTime2: uploadTime2,
systemType: systemType,
systemTypeOff: systemTypeOff
},
done: function(res, curr, count){
console.log(res);
console.log(curr);
console.log(count);
},
page: {
curr: 1
}
});