|
@@ -22,18 +22,16 @@
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="layui-card-body">
|
|
<div class="layui-card-body">
|
|
- <div style="padding-bottom: 10px;">
|
|
|
|
- <button class="layui-btn layuiadmin-btn" data-type="batchdel">删除</button>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
<table id="LAY-demand-demandlist-table" lay-filter="LAY-demand-demandlist-table"></table>
|
|
<table id="LAY-demand-demandlist-table" lay-filter="LAY-demand-demandlist-table"></table>
|
|
<script type="text/html" id="selectStatus">
|
|
<script type="text/html" id="selectStatus">
|
|
<select name="status" lay-filter="status" data-value=""></select>
|
|
<select name="status" lay-filter="status" data-value=""></select>
|
|
</script>
|
|
</script>
|
|
<script type="text/html" id="setTpl">
|
|
<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-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>
|
|
|
|
|
|
+ {{# if(d.status > 1){ }}
|
|
|
|
+ <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="report"><i class="layui-icon layui-icon-edit"></i>报备</a>
|
|
|
|
+ <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="reportlog"><i class="layui-icon layui-icon-edit"></i>报备记录</a>
|
|
|
|
+ {{# } }}
|
|
|
|
+ <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="detail"><i class="layui-icon layui-icon-delete"></i>订单详情</a>
|
|
</script>
|
|
</script>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -59,10 +57,9 @@
|
|
url: setter.baseWorkerUrl + 'demand/roblist',
|
|
url: setter.baseWorkerUrl + 'demand/roblist',
|
|
cols: [
|
|
cols: [
|
|
[
|
|
[
|
|
- { type: 'checkbox', fixed: 'left' },
|
|
|
|
{ field: 'id', width: 80, title: '表ID', sort: true },
|
|
{ field: 'id', width: 80, title: '表ID', sort: true },
|
|
{ field: 'demand', title: '岗位标题', minWidth: 200, toolbar: '<div>{{d.demand.title}}</div>' },
|
|
{ field: 'demand', title: '岗位标题', minWidth: 200, toolbar: '<div>{{d.demand.title}}</div>' },
|
|
- { field: 'worker', title: '公司名称', width: 200, toolbar: '<div>{{d.worker.title}}</div>' },
|
|
|
|
|
|
+ { field: 'worker', title: '公司名称', width: 200, toolbar: '<div>{{d.demand.worker.title}}</div>' },
|
|
{ field: 'demand', title: '联系电话', width: 120, toolbar: '<div>{{d.demand.telephone}}</div>' },
|
|
{ field: 'demand', title: '联系电话', width: 120, toolbar: '<div>{{d.demand.telephone}}</div>' },
|
|
{ field: 'num', title: '招聘人数', width: 100 },
|
|
{ field: 'num', title: '招聘人数', width: 100 },
|
|
{ field: 'status_text', title: '状态', width: 100 },
|
|
{ field: 'status_text', title: '状态', width: 100 },
|
|
@@ -86,66 +83,31 @@
|
|
});
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
- var active = {
|
|
|
|
- batchdel: function() {
|
|
|
|
- var checkStatus = table.checkStatus('LAY-demand-demandlist-table'),
|
|
|
|
- checkData = checkStatus.data; //得到选中的数据
|
|
|
|
- if (checkData.length === 0) {
|
|
|
|
- return layer.msg('请选择数据');
|
|
|
|
- }
|
|
|
|
- var idarr = [];
|
|
|
|
- for (var i = 0; i < checkData.length; i++) {
|
|
|
|
- idarr.push(checkData[i].id);
|
|
|
|
- }
|
|
|
|
- layer.confirm('确定删除此订单信息吗?', function(index) {
|
|
|
|
- admin.req({
|
|
|
|
- url: setter.baseWorkerUrl + 'demand/deldemand',
|
|
|
|
- data: {
|
|
|
|
- idarr: idarr
|
|
|
|
- },
|
|
|
|
- done: function(res) {
|
|
|
|
- obj.del();
|
|
|
|
- layer.msg('已删除');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- table.reload('LAY-demand-demandlist-table');
|
|
|
|
- layer.msg('已删除');
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- add: function() {
|
|
|
|
- var index = layer.open({
|
|
|
|
|
|
+ table.on('tool(LAY-demand-demandlist-table)', function(obj) {
|
|
|
|
+ var data = obj.data;
|
|
|
|
+ if (obj.event === 'report') {
|
|
|
|
+ let index = layer.open({
|
|
type: 2,
|
|
type: 2,
|
|
- title: '发布其他订单',
|
|
|
|
- content: 'otherForm.html?id=0',
|
|
|
|
|
|
+ title: '报备',
|
|
|
|
+ content: 'report.html?id=' + data.id,
|
|
maxmin: true,
|
|
maxmin: true,
|
|
area: ['750px', '480px']
|
|
area: ['750px', '480px']
|
|
});
|
|
});
|
|
layer.full(index);
|
|
layer.full(index);
|
|
- },
|
|
|
|
- };
|
|
|
|
-
|
|
|
|
- table.on('tool(LAY-demand-demandlist-table)', function(obj) {
|
|
|
|
- var data = obj.data;
|
|
|
|
- if (obj.event === 'del') {
|
|
|
|
- layer.confirm('确定删除此订单信息吗?', function(index) {
|
|
|
|
- admin.req({
|
|
|
|
- url: setter.baseWorkerUrl + 'demand/deldemand',
|
|
|
|
- data: {
|
|
|
|
- idarr: [data.id]
|
|
|
|
- },
|
|
|
|
- done: function(res) {
|
|
|
|
- obj.del();
|
|
|
|
- layer.msg('已删除');
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- layer.close(index);
|
|
|
|
- });
|
|
|
|
- } else if (obj.event === 'edit') {
|
|
|
|
- var index = layer.open({
|
|
|
|
|
|
+ } else if (obj.event === 'reportlog') {
|
|
|
|
+ let index = layer.open({
|
|
type: 2,
|
|
type: 2,
|
|
title: '编辑其他订单信息',
|
|
title: '编辑其他订单信息',
|
|
- content: 'otherform.html?id=' + data.id,
|
|
|
|
|
|
+ content: 'reportlog.html?id=' + data.id,
|
|
|
|
+ maxmin: true,
|
|
|
|
+ area: ['750px', '480px']
|
|
|
|
+ });
|
|
|
|
+ layer.full(index);
|
|
|
|
+ } else if (obj.event === 'detail') {
|
|
|
|
+ let index = layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ title: '订单详情',
|
|
|
|
+ content: 'demanddetail.html?id=' + data.demand_id,
|
|
maxmin: true,
|
|
maxmin: true,
|
|
area: ['750px', '480px']
|
|
area: ['750px', '480px']
|
|
});
|
|
});
|
|
@@ -153,10 +115,5 @@
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
- $('.layui-btn.layuiadmin-btn').on('click', function() {
|
|
|
|
- var type = $(this).data('type');
|
|
|
|
- active[type] ? active[type].call(this) : '';
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|