123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <!DOCTYPE html>
- <!--
- To change this license header, choose License Headers in Project Properties.
- To change this template file, choose Tools | Templates
- and open the template in the editor.
- -->
- <html>
- <head>
- <title>审核单位设置</title>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="/static/js/jquery.min.js"></script>
- <style>
- *{margin:0;padding:0;transition:background-color .25s ease;}
- body{color:#434343;}
- .content{width:1210px;margin:0 auto;padding:20px;}
- table{border-collapse:collapse;}
- td,th{border:1px solid #ddd;padding:5px 5px;text-align:center;}
- td:nth-child(3){text-align:left;}
- tr:hover{background:#e0edff}
- select{background:#fff;border:1px solid #ddd;padding:5px;}
- input[type=checkbox]{width:30px;height:30px;cursor:pointer;}
- </style>
- </head>
- <body>
- <div class="content">
- <div style="text-align:right;color:#ac0835;padding:5px;">设置单位:{$company.name}</div>
- <table>
- <thead>
- <tr>
- <th width="15%">人才层次
- <select id="level" onchange="Policy.levelChange(event);" autocomplete="off">
- <option value="1">一</option>
- <option value="2">二</option>
- <option value="3">三</option>
- <option value="4">四</option>
- <option value="5">五</option>
- <option value="6">六</option>
- <option value="7">七</option>
- <option value="">全部</option>
- </select>
- </th>
- <th width="10%">标签</th>
- <th width="70%">人才认定标准</th>
- <th width="10%">选择</th>
- </tr>
- </thead>
- <tbody>
- {volist name="policys" id="policy"}
- <tr data-level="{$policy.level}" {gt name="policy.level" value="1"}style="display:none;"{/gt}>
- <td>{$policy.level}</td>
- <td>{$policy.tag}</td>
- <td>{$policy.policy_name}</td>
- <td><input type="checkbox" data-id="{$policy.id}" {if condition="$policy['checked']"}checked="checked"{/if}></td>
- </tr>
- {/volist}
- </tbody>
- </table>
- </div
- </body>
- <script>
- $(document).ready(function () {
- $("input[type=checkbox]").change(function () {
- var data = {};
- data.id = $(this).data("id");
- data.checked = 2;
- if ($(this).is(":checked")) {
- data.checked = 1;
- }
- $.ajax({
- url: "/admin/policy/checked",
- type: "post",
- data: data,
- success: function (res) {
- if (res.code != 200)
- alert(res.msg);
- }
- })
- })
- })
- var Policy = {};
- Policy.levelChange = function (e) {
- var that = e.target;
- var selLvl = $(that).val();
- if (selLvl) {
- $("tbody tr[data-level!='" + selLvl + "']").css("display", "none");
- $("tbody tr[data-level='" + selLvl + "']").css("display", "table-row");
- }else{
- $("tbody tr[data-level]").css("display", "table-row");
- }
- }
- </script>
- </html>
|