UEP-按钮控制及时间
按钮的判断 var record = ajaxgrid.getAllRecords(); if(record.length>0){ var isPack=record[0].get("dispatchDate"); if(isPack==null){ onsave_id.display("block"); dispatch_id.display("block"); dispatchMan_id.display("none"); ajaxgrid.setColumnReadonly("rfidCode",false); }else{ onsave_id.display("none"); dispatch_id.display("none"); dispatchMan_id.display("block") ajaxgrid.setColumnReadonly("rfidCode",true); } }else{ onsave_id.display("none"); dispatch_id.display("none"); dispatchMan_id.display("none"); ajaxgrid.setColumnReadonly("rfidCode",true); } } 获取当前时间:CommonUtil.getDateTime() //时间过滤 String opTime1 = this.getProperty("opTime1");//开始时间 String opTime2 = this.getProperty("opTime2");//结束时间 if(opTime1!=null&&!"".equals(opTime1)){ params.addParam("fillDate",Timestamp.valueOf(opTime1),QueryParam.RELATION_GE); } if(opTime2!=null&&!"".equals(opTime2)){ Timestamp endDate = CommonUtil.addDay(Timestamp.valueOf(opTime2), 1);//结束时间默认加一天 params.addParam("fillDate",endDate,QueryParam.RELATION_LE); }