deposit.html 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {extend name="public/layout"/} {block name="title"}在施工地{/block} {block name="body"}
  2. <link rel="stylesheet" href="__STATIC__/css/csspc.css">
  3. <link rel="stylesheet" href="__STATIC__/css/font.css">
  4. <style>
  5. html,body{height:auto;min-width: 100%;}
  6. .body{height: 100%;overflow: hidden;background: #F6F7FB;}
  7. .bodys_top,.bodys_b{background: #fff;border-radius: 8px;}
  8. .bodys_top ul li{width:20%;font-size: 16px;color:#999;margin-bottom: 30px;float:left;}
  9. .search-ico{top:23%;right:5%;color:#249EFB;font-size: 20px;}
  10. .bodys_b{height: 75vh;}
  11. </style>
  12. <body>
  13. <div class="width97_ wauto bodys">
  14. <div class="bodys_b mdt16 woverflow">
  15. <div class="width96_ wauto woverflow">
  16. <div class="layui-form-item mdt20">
  17. <div class="layui-input-inline wpsr" style="width: 23%;">
  18. <input type="text" name="name" required id="keyword" lay-verify="required" placeholder="请输入搜索内容" autocomplete="off" class="layui-input">
  19. <i class="fa fa-search search-ico wpsa href" aria-hidden="true" id="search"></i>
  20. </div>
  21. <div class="layui-inline layui-form " style="width: 240px;">
  22. <select name="state" id="org_id" lay-filter="stateFilter">
  23. <option value="">部门筛选</option>
  24. {volist name="org" id="i"}
  25. <option value="{$i.id}">{$i.name}</option>
  26. {/volist}
  27. </select>
  28. </div>
  29. </div>
  30. <div class="datalist">
  31. <table id="grant" lay-filter="grant" style="margin-top:15px;"></table>
  32. </div>
  33. </div>
  34. </div>
  35. </div>
  36. </body>
  37. {/block} {block name="js"}
  38. <script>
  39. layui.config({
  40. base: '__LAYUI__/',
  41. urlbase: '/sys'
  42. }).extend({
  43. index: 'lib/index' //主入口模块
  44. }).use(['index', 'form','table'], function() {
  45. var $ = layui.$,
  46. table = layui.table,
  47. form = layui.form;
  48. table.render({
  49. elem: '#grant',
  50. url: '{:url("preformanceTasks/deposit_list")}?id='+"{$id}&type=0",
  51. page: true,
  52. height: '400vh',
  53. cols: [
  54. [{
  55. field: 'ranking',
  56. fixed: 'left',
  57. title: '排行',
  58. }, {
  59. field: 'name',
  60. title: '姓名',
  61. }, {
  62. field: 'org_name',
  63. title: '部门',
  64. }, {
  65. field: 'value',
  66. title: '交定(个)',
  67. }]
  68. ],
  69. text: '对不起,加载出现异常!'
  70. });
  71. $('#search').click(function(){
  72. var keyword = $('#keyword').val();
  73. //执行重载
  74. table.reload('grant', {
  75. where: {keyword:keyword}
  76. , page: { curr: 1 }
  77. });
  78. });
  79. form.on('select(stateFilter)',function(data){
  80. var org_id = data.value;
  81. var field = {};
  82. field['org_id'] = org_id;
  83. //执行重载
  84. table.reload('grant', {
  85. where: field,
  86. page: {
  87. curr: 1
  88. }
  89. });
  90. })
  91. })
  92. </script>
  93. {/block}