appeal_list.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $(document).ready(function(){
  2. queryTable();
  3. function queryTable(){
  4. var data = {}
  5. var name = $("#select_name").val();
  6. if(name!=''){
  7. data.name = name ;
  8. }
  9. var start_time = $("#start-time").val();
  10. var end_time = $("#end-time").val();
  11. var dept_select = $("#dept_select").val();
  12. if(start_time != ''){
  13. data.start_time = start_time;
  14. }
  15. if(end_time != ''){
  16. data.end_time = end_time;
  17. }
  18. if(dept_select!='' && dept_select != 0){
  19. data.appeal_dept = dept_select;
  20. }
  21. var cols = [
  22. {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
  23. {width: 100, text: '任务名称', flex: false,colClass: '',field:'name'},
  24. {width: 80, text: '考核人员', flex: false, colClass: '',field:'appeal_man_name'},
  25. {width: 100, text: '考核部门', flex: false, colClass: '',sort: 'down',field:'appeal_dept_name'},
  26. {width: 80, text: '稽查人员', type: 'string', flex: false, colClass: '',field:'verify_person_name'},
  27. {width: 120, text: '稽查时间段', type: 'string',custom:'-24:00', flex: false, colClass: '',field:'start_time'},
  28. {width: 80, text: '状态', type: 'string', flex: false, colClass: '',field:'code_name'},
  29. {width: 120, text: '上次稽查时间', type: 'string', flex: false, colClass: '',field:'start_time'},
  30. {width: 100, text: '操作', flex: false, colClass: '',field:'id',field_other:'task_id',oper:[
  31. {func:'seeCheckAudit',text:'查看稽查结果',col_class:''},{func:'distributionAgain',text:'在分配',col_class:''},{func:'seeDetail',text:'详情',col_class:''}
  32. ]},
  33. ] ;
  34. $('.datatable').mytable({'cols':cols,
  35. 'url':"checkAppeal/getList",
  36. 'param':data}
  37. );
  38. }
  39. //条件查询
  40. $("#conditional_query").click(function(){
  41. queryTable();
  42. })
  43. getDeptList();
  44. //初始化部门下拉框
  45. function getDeptList(){
  46. data ={}
  47. post_common_service("dept/get/all", data, function(data){
  48. $("#dept_select").empty();
  49. $("#dept_select").append('<option value="">全部</option>');
  50. for(i=0;i<data.length;i++){
  51. $("#dept_select").append('<option value="'+data[i].id+'">'+data[i].organname+'</option>');
  52. }
  53. }, function(){
  54. });
  55. }
  56. })
  57. //查看稽查结果
  58. function seeCheckAudit(id,task_id){
  59. alert("task_id:"+task_id+"---id:"+id)
  60. }
  61. //再分配
  62. function distributionAgain(id,task_id){
  63. alert("task_id:"+task_id+"---id:"+id)
  64. }
  65. //详情
  66. function seeDetail(id,task_id){
  67. alert("task_id:"+task_id+"---id:"+id)
  68. }