2025-11-27 16:55:35 +08:00
<!DOCTYPE html>
< html lang = "en" >
< head >
< meta charset = "UTF-8" >
< title > 用工信息新增< / title >
< link rel = "stylesheet" type = "text/css" media = "screen"
href="../../../layui/css/layui.css">
< script type = "text/javascript"
src="../../../js/libs/jquery-3.7.1.min.js">< / script >
< script type = "text/javascript" src = "../../../layui/layui.js" > < / script >
2025-12-09 18:44:29 +08:00
< script type = "text/javascript" src = "../../../../public/public.js" > < / script >
2025-11-27 16:55:35 +08:00
< script type = "text/javascript" src = "../../../js/publicJs.js" > < / script >
< script type = "text/javascript" src = "../../../js/jq.js" > < / script >
< style type = "text/css" >
.layui-form-label {
widtd: 120px;
}
.layui-input-block {
margin-left: 150px;
}
.dataDiv{
text-align: left;
line-height: 20px;
}
.dataDiv,
a:focus {
/* 在点击输入时,不让框显示 */
outline: none;
/* 默认情况下, 隐藏input框 */
border: none;
}
table{
font-size: 15px !important;
table-layout:fixed;
color: #000000 !important;
margin-left: 11%;
}
td{
padding:18px !important;
height: 30px !important;
}
.titleData{
text-align: center;
border-top: 1px solid #000 !important;
border-left: 1px solid #000 !important;
border-right: 1px solid #000 !important;
border-bottom: 1px solid #000 !important;
}
#rowone{
width: 80px;
border-radius: 5px;
background-color: #10a5e8;
color: white;
height: 30px;
float: right;
}
table,td,tr {
margin-left: 0%;
width: 100%;
margin: auto;
}
< / style >
< / head >
< body >
< div class = "layui-form" id = "dataDiv" style = " margin-top: 2%;" >
< form class = "layui-form" id = "projectForm" action = "" >
< table id = "baseTable" >
< tbody >
< input type = "hidden" id = "id" name = "id" >
< input type = "hidden" id = "auditType" name = "auditType" value = "0" >
< div class = "layui-input-inline" style = "margin-top: 20px; margin-left: 13%;margin-bottom: 20px;" >
< label class = "layui-form-label" > < i class = "tip-required" style = "color: red; font-size: 20px;" > *< / i >
班组类型:< / label >
< div class = "layui-input-block" >
< input id = "teamType" name = "teamType" readonly lay-verify = "required"
class="layui-input">
< / div >
< / div >
< div class = "layui-input-inline" style = " margin-left: 17%;" >
< label class = "layui-form-label" style = "width: 29%" > < i class = "tip-required"
style="color: red; font-size: 20px;margin-top: 20px;margin-bottom: 20px;">*< / i > 班组长身份证:< / label >
< div class = "layui-input-block" >
< input style = "disabled:disabled" readonly type = "text" name = "idCard" id = "idCard" required
lay-verify="required|subcontract|objName" class="layui-input">
< / div >
< / div >
< br / >
< div class = "layui-input-inline" style = "margin-bottom: 20px; margin-left: 13%;" >
< label style = "position: absolute;" class = "layui-form-label" > < i class = "tip-required"
style="color: red; font-size: 20px;">*< / i >
班组长:< / label >
< div class = "layui-input-block" >
< input type = "text" name = "teamMonitor" readonly id = "teamMonitor" required lay-verify = "required"
class="layui-input">
< / div >
< / div >
< div class = "layui-input-inline" style = " margin-left: 17%;" >
< label class = "layui-form-label" style = "width: 30% ;margin-top: -3%;" >
< i class = "tip-required" style = "color: red; font-size: 20px;margin-bottom: 20px;" > *< / i > 班组长电话号:< / label >
< div class = "layui-input-block" >
< input required lay-verify = "required|contactWay" readonly style = "margin-top: -6%;" type = "text" name = "teamTelep" id = "teamTelep"
class="layui-input">
< / div >
< / div >
< div class = "layui-input-inline" style = "margin-left: 0%; margin-left: 13%;" >
< label class = "layui-form-label" >
备注:< / label >
< div class = "layui-input-block" >
< textarea type = "text" readonly cols = "98" name = "remark" maxlengtd = "200" id = "remark"
class="layui-input" style="widtd: 520px;height: 120px;">< / textarea >
< / div >
< / div >
< div >
< h2 style = "margin-left: 15%; font-weight: bold" > 施工人员信息填写< / h2 >
< tr >
< td class = "titleData" style = "width: 15%" > 姓名< / td >
< td class = "titleData" style = "width: 8%" > 性别< / td >
< td class = "titleData" style = "width: 8%" > 年龄< / td >
< td class = "titleData" style = "width: 15%" > 工种< / td >
< td class = "titleData" style = "width: 15%" > 持证< / td >
< td class = "titleData" style = "width: 30%" > 工作履历< / td >
< / tr >
< tbody id = "getsafelist" >
< / tbody >
< br / >
< tr >
< td >
< label style = "" >
< i style = "color: red; font-size: 20px" > *< / i >
审核:
< / label >
< / td >
< td >
< select id = "releaseStatus" name = "releaseStatus"
style="width: 80px;height: 60px;">
< option value = "" > 请选择< / option >
< option value = "1" > 已通过< / option >
< option value = "2" > 未通过< / option >
< / select >
< / td >
< / tr >
< div class = "layui-form-item" style = "display: none" >
< div class = "layui-input-block" >
< button type = "button" class = "layui-btn" id = "commit" lay-submit lay-filter = "formDemo" > 提交< / button >
< / div >
< / div >
< / tbody >
< / table >
< / form >
< / div >
< / body >
< script >
$(function () {
layui.use(['form'], function () {
var form = layui.form; //只有执行了这一步,部分表单元素才会自动修饰成功
form.render();
// 验证成功后才会执行下面的操作
form.on('submit(formDemo)', function (data) {
auditWorkInfo(); // 新增工程
});
});
});
var size = 0; //序号
function setData(data) {
$("#teamType").val(data[0].teamType);
$("#id").val(data[0].id);
$("#number").val(data[0].number);
$("#holder").val(data[0].holder);
$("#teamMonitor").val(data[0].teamMonitor);
$("#idCard").val(data[0].idCard);
$("#contactWay").val(data[0].contactWay);
$("#teamTelep").val(data[0].teamTelep);
$("#remark").html(data[0].remark);
$.ajax({
type: 'POST',
2025-12-09 18:44:29 +08:00
url: smz_ht_url + '/migrant/getWorkInfoSonById',
2025-11-27 16:55:35 +08:00
data:{"id":data[0].id},
dataType: 'json',
success: function (data) {
if(data.length >0){
var html = "";
for(var i=0;i< data.length ; i + + ) {
size++;
html += "< tr class = 'pa"+size+"' > ";
html += "< td class = 'titleData trueName' > < input value = '"+data[i].trueName+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"trueName\"/ > < / td > "
html += "< td class = 'titleData sex' > < input value = '"+data[i].sex+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"sex\"/ > < / td > "
html += "< td class = 'titleData old' > < input value = '"+data[i].old+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"old\"/ > < / td > "
html += "< td class = 'titleData typeWork' > < input value = '"+data[i].teamWork+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"typeWork\"/ > < / td > "
html += "< td class = 'titleData holder' > < input value = '"+data[i].holder+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"holder\"/ > < / td > "
html += "< td class = 'titleData workHistory' > < input value = '"+data[i].workHistory+"' readonly style = \"width: 100 % ; height: 100 % ; text-align: center ; \ " class = \"dataDiv\" name = \"workHistory\"/ > < / td > "
"< / tr > ";
}
$("#getsafelist").append(html);
}
}
})
}
function auditWorkInfo() {
var status = $("#releaseStatus").val();
var id = $("#id").val();
if (status == "") {
layer.msg("请选择审核内容,同意/不同意")
} else {
// 加载提示
var loadingMsg = layer.msg('数据请求中,请稍候...', {icon: 16, scrollbar: false, time: 0, shade: [0.8, '#393D49']});
// form请求地址
2025-12-09 18:44:29 +08:00
var formUrl = smz_ht_url + "/migrant/auditInfoById";
2025-11-27 16:55:35 +08:00
$.ajax({
type: 'POST',
async: false, // 默认异步true,false表示同步
url: formUrl, // 请求地址project
dataType: 'text', // 服务器返回数据类型
data: {
"id": id,
"auditResult": status
}, //获取提交的表单字段
success: function (data) {
layer.close(loadingMsg); // 关闭提示层
if (data == 'success') {
parent.layer.alert('审核成功', {icon: 1}, function () {
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
parent.layer.close(index); //再执行关闭
window.parent.location.reload();//刷新父页面
});
} else {
parent.layer.alert('审核失败', {icon: 2}, function () {
var index = parent.layer.getFrameIndex(window.name); //先得到当前 iframe层的索引
parent.layer.close(index); //再执行关闭
window.parent.location.reload();//刷新父页面
});
}
},
error: function (XMLHttpRequest, textStatus, e) {
layer.close(loadingMsg);
layer.msg('数据请求发生异常,请稍后重试', {icon: 16, scrollbar: false});
}
});
}
}
< / script >
< / html >