| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-form layui-form-pane layui-card-header layuiadmin-card-header-auto" lay-filter="LAY-outjob-list-search">
- <div class="layui-form-item">
- <div class="layui-inline">
- <label class="layui-form-label">岗位标题</label>
- <div class="layui-input-block">
- <input type="text" name="keywords" placeholder="请输入" autocomplete="off" class="layui-input">
- </div>
- </div>
- <div class="layui-inline">
- <label class="layui-form-label">状态</label>
- <div class="layui-input-block">
- <select name="status">
- <option value="">全部状态</option>
- <option value="1">审核通过</option>
- <option value="2">待审核</option>
- <option value="3">审核不通过</option>
- </select>
- </div>
- </div>
- <div class="layui-inline">
- <button class="layui-btn" lay-submit lay-filter="LAY-outjob-list-btn">
- <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
- </button>
- </div>
- </div>
- </div>
- <div class="layui-card-body">
- <div style="padding-bottom: 10px;">
- <button class="layui-btn layuiadmin-btn" data-type="add">添加</button>
- </div>
- <table id="LAY-outjob-list-table" lay-filter="LAY-outjob-list-table"></table>
- <script type="text/html" id="setTpl">
- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"></i>编辑</a>
- <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del"><i class="layui-icon layui-icon-delete"></i>删除</a>
- <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="report"><i class="layui-icon layui-icon-edit"></i>报备记录</a>
- </script>
- </div>
- </div>
- </div>
- <script>
- layui.config({
- base: '/static/echoui/' //静态资源所在路径
- }).extend({
- index: 'lib/index' //主入口模块
- }).use(['index', 'form', 'set', 'laydate', 'table'], function() {
- var $ = layui.$,
- setter = layui.setter,
- admin = layui.admin,
- form = layui.form,
- table = layui.table;
- form.render();
-
- table.render({
- elem: '#LAY-outjob-list-table',
- url: setter.baseAdminUrl + 'outjob/index',
- cols: [
- [
- { field: 'id', width: 80, title: '表ID', sort: true },
- { field: 'title', title: '岗位标题', minWidth: 300},
- { field: 'company_name', title: '公司名称', width: 250 },
- { field: 'num', title: '招聘人数', width: 100 },
- { field: 'province', title: '省', width: 100 },
- { field: 'city', title: '市', width: 100 },
- { field: 'district', title: '区县', width: 100 },
- { field: 'address', title: '地址', width: 100 },
- { field: 'agegroup', title: '招工年龄', edit: 'text', width: 120 },
- { field: 'salary', title: '工资' },
- { field: 'telephone', title: '咨询电话'},
- { field: 'status_text', title: '状态', width: 80, align: 'center' },
- { field: 'volume', title: '浏览量', width: 100, align: 'right' },
- { field: 'priority', width: 100, title: '排序', sort: true},
- { title: '操作', width: 250, align: 'center', fixed: 'right', toolbar: '#setTpl' }
- ]
- ],
- page: true,
- limit: 50,
- toolbar: true,
- cellMinWidth: 150,
- text: '对不起,加载出现异常!'
- });
- form.on('submit(LAY-outjob-list-btn)', function(data) {
- table.reload('LAY-outjob-list-table', {
- where: data.field,
- page: {
- curr: 1
- }
- });
- });
- var active = {
- add: function() {
- var index = layer.open({
- type: 2,
- title: '添加招聘信息',
- content: 'recruitform.html?id=0',
- maxmin: true,
- area: ['750px', '480px']
- });
- layer.full(index);
- }
- };
- table.on('tool(LAY-outjob-list-table)', function(obj) {
- var data = obj.data;
- if (obj.event === 'del') {
- layer.confirm('确定删除此招聘信息吗?', function(index) {
- admin.req({
- url: setter.baseAdminUrl + 'outjob/delrecruit',
- data: {
- id: data.id
- },
- done: function(res) {
- obj.del();
- layer.msg('已删除');
- }
- });
- layer.close(index);
- });
- } else if (obj.event === 'edit') {
- var index = layer.open({
- type: 2,
- title: '编辑招聘信息',
- content: 'recruitform.html?id=' + data.id,
- maxmin: true,
- area: ['750px', '480px']
- });
- layer.full(index);
- }else if (obj.event === 'report') {
- var index = layer.open({
- type: 2,
- title: data.title + '的报备记录',
- content: 'report.html?id=' + data.id,
- maxmin: true,
- area: ['750px', '480px']
- });
- layer.full(index);
- }
- });
- $('.layui-btn.layuiadmin-btn').on('click', function() {
- var type = $(this).data('type');
- active[type] ? active[type].call(this) : '';
- });
- });
- </script>
|