ZhiYeJianKang/职业健康平台后端/target/dzzyb/static/quxian/gcyg.html

139 lines
3.1 KiB
HTML
Raw Normal View History

2025-02-20 15:25:59 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>工程用工</title>
<link rel="stylesheet" href="js/layui-v2.5.6/layui/css/layui.css" media="all">
<style type="text/css">
.layui-btn-primary {
border: 1px solid #C9C9C9;
background-color: #01b9dd !important;
color: white !important;
}
</style>
<script>
function ckzy(data) {
layer.open({
type: 2,
area: ['50%', '70%'],
title: "查看",
maxmin: true,
content: 'gcygform.html',
btn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
function qjcx() {
layer.open({
type: 2,
area: ['50%', '70%'],
title: "区间查询",
maxmin: true,
content: 'gcygqjcx.html',
tn: ['关闭'],
yes: function(index) {
layer.close(index);
}
})
}
</script>
</head>
</head>
<body>
<button type="button" class="layui-btn">添加</button>
<button type="button" class="layui-btn">修改</button>
<button type="button" class="layui-btn">删除</button>
<button type="button" class="layui-btn" onclick="qjcx()">审批状态</button>
<table id="demo" class="layui-hide" lay-filter="xk"></table>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
<a class="layui-btn layui-btn-xs" lay-event="edit">通过</a>
</script>
<script src="js/layui-v2.5.6/layui/layui.all.js"></script>
<script>
layui.use('table', function() {
var table = layui.table;
table.render({
elem: '#demo',
data: [{
"a1": "030005",
"a2": "中建二局华北公司齐河中骏雍景湾",
"a3": "王替电",
"a4": "13782956335",
"a5": "143人",
"a6": "劳动用工",
"a7": "全日制",
"a8": "审批中"
},
{
"a1": "030006",
"a2": "2017年棚户区改造项目工程施工(小刘社区二期项目AB区)",
"a3": "吴康泰",
"a4": "15932556758",
"a5": "187人",
"a6": "劳动用工",
"a7": "全日制",
"a8": "通过"
}
],
cellMinWidth: 80 //全局定义常规单元格的最小宽度
,
page: true //开启分页
,
cols: [
[ //表头
{
field: 'a2',
title: '工程名称'
}, {
field: 'a3',
title: '负责人'
}, {
field: 'a4',
title: '联系方式'
}, {
field: 'a5',
title: '用工数量'
}, {
field: 'a6',
title: '用工方式'
}, {
field: 'a7',
title: '用工性质'
}, {
field: 'a8',
title: '状态'
}, {
fixed: 'right',
title: '操作',
width: 165,
align: 'center',
toolbar: '#barDemo'
}
]
]
});
//监听行工具事件
table.on('tool(xk)', function(obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
var data = obj.data //获得当前行数据
,
layEvent = obj.event; //获得 lay-event 对应的值
if (layEvent === 'detail') {
ckzy();
} else if (layEvent === 'edit') {
layer.msg('通过申请');
}
});
});
</script>
</body>
</html>