ZhiYeJianKang/职业健康平台后端/target/dzzyb/webpage/modules/zyb/addqyxcjyda.jsp
2025-02-20 15:25:59 +08:00

1532 lines
39 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/webpage/include/taglib.jsp" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
<head>
<title>添加评价列表</title>
<meta name="decorator" content="default"/>
<%-- 引入layui的css--%>
<%-- <link rel="stylesheet" href="${ctxStatic}/layui/css/layui.css">--%>
<link rel="stylesheet" href="${ctxStatic}/layui-v2.4.5/layui/css/layui.css" media="all">
<style type="text/css">
.xline {
border-bottom: solid 2px #7A378B;
height: 5px;
}
</style>
<style type="text/css">
/* 纵向布局 */
.j-column {
display: flex;
flex-direction: column;
}
/* 横向布局 */
.j-row {
display: flex;
flex-direction: row;
}
/* 横向布局 元素靠左*/
.j-row-left {
display: flex;
flex-direction: row;
justify-content: flex-start;
}
/* 横向布局 元素靠右*/
.j-row-right {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
/* 横向布局 元素居中*/
.j-row-center {
display: flex;
flex-direction: row;
justify-content: center;
}
/* 横向布局 元素两端对齐*/
.j-row-between {
display: flex;
flex-direction: row;
justify-content: space-between;
}
/* 横向布局 元素两端有空隙*/
.j-row-around {
display: flex;
flex-direction: row;
justify-content: space-around;
}
/* 纵向布局 元素靠上 */
.j-column-top {
display: flex;
flex-direction: column;
justify-content: flex-start;
}
/* 纵向布局 元素靠下*/
.j-column-bottom {
display: flex;
flex-direction: column;
justify-content: flex-end;
}
/* 纵向布局 元素居中*/
.j-column-center {
display: flex;
flex-direction: column;
justify-content: center;
}
/* 交叉轴居上*/
.j-ai-top {
align-items: flex-start;
}
/* 交叉轴居下*/
.j-ai-bottom {
align-items: flex-end;
}
/* 交叉轴居中*/
.j-ai-center {
align-items: center;
}
/* 上外边距*/
.j-mt {
margin-top: 10px;
}
/* 下外边距*/
.j-mb {
margin-bottom: 10px;
}
/* 左外边距*/
.j-ml {
margin-left: 10px;
}
/* 右外边距*/
.j-mr {
margin-right: 10px;
}
/* 不换行*/
.j-nowrap {
white-space: nowrap;
}
/* 内容超出长度后出现滚动条*/
.j-overflow {
overflow: auto;
}
/* 内容溢出换行*/
.j-wrap-wrap {
flex-wrap: wrap;
}
/* 吸顶 */
.j-suctionTop {
position: -webkit-sticky;
position: sticky;
top: 0;
}
/* 边框 */
.j-border {
border: solid 0.8px #e8e8e8;
/* box-shadow:rgba(0, 0, 0, 0.3) 0px 0px 5px; */
}
/* 下边框 */
.j-border-bottom {
border-bottom: solid 1px #e8e8e8;
border-radius: 0px !important;
/* box-shadow:rgba(0, 0, 0, 0.3) 0px 0px 5px; */
}
/* 宽100栅格*/
.j-w-0 {
width: 0
}
.j-w-1 {
width: 1%;
}
.j-w-2 {
width: 2%;
}
.j-w-3 {
width: 3%;
}
.j-w-4 {
width: 4%;
}
.j-w-5 {
width: 5%;
}
.j-w-6 {
width: 6%;
}
.j-w-7 {
width: 7%;
}
.j-w-8 {
width: 8%;
}
.j-w-9 {
width: 9%;
}
.j-w-10 {
width: 10%;
}
.j-w-11 {
width: 11%;
}
.j-w-12 {
width: 12%;
}
.j-w-13 {
width: 13%;
}
.j-w-14 {
width: 14%;
}
.j-w-15 {
width: 15%;
}
.j-w-16 {
width: 16%;
}
.j-w-17 {
width: 17%;
}
.j-w-18 {
width: 18%;
}
.j-w-19 {
width: 19%;
}
.j-w-20 {
width: 20%;
}
.j-w-21 {
width: 21%;
}
.j-w-22 {
width: 22%;
}
.j-w-23 {
width: 23%;
}
.j-w-24 {
width: 24%;
}
.j-w-25 {
width: 25%;
}
.j-w-26 {
width: 26%;
}
.j-w-27 {
width: 27%;
}
.j-w-28 {
width: 28%;
}
.j-w-29 {
width: 29%;
}
.j-w-30 {
width: 30%;
}
.j-w-31 {
width: 31%;
}
.j-w-32 {
width: 32%;
}
.j-w-33 {
width: 33%;
}
.j-w-34 {
width: 34%;
}
.j-w-35 {
width: 35%;
}
.j-w-36 {
width: 36%;
}
.j-w-37 {
width: 37%;
}
.j-w-38 {
width: 38%;
}
.j-w-39 {
width: 39%;
}
.j-w-40 {
width: 40%;
}
.j-w-41 {
width: 41%;
}
.j-w-42 {
width: 42%;
}
.j-w-43 {
width: 43%;
}
.j-w-44 {
width: 44%;
}
.j-w-45 {
width: 45%;
}
.j-w-46 {
width: 46%;
}
.j-w-47 {
width: 47%;
}
.j-w-48 {
width: 48%;
}
.j-w-49 {
width: 49%;
}
.j-w-50 {
width: 50%;
}
.j-w-51 {
width: 51%;
}
.j-w-52 {
width: 52%;
}
.j-w-53 {
width: 53%;
}
.j-w-54 {
width: 54%;
}
.j-w-55 {
width: 55%;
}
.j-w-56 {
width: 56%;
}
.j-w-57 {
width: 57%;
}
.j-w-58 {
width: 58%;
}
.j-w-59 {
width: 59%;
}
.j-w-60 {
width: 60%;
}
.j-w-61 {
width: 61%;
}
.j-w-62 {
width: 62%;
}
.j-w-63 {
width: 63%;
}
.j-w-64 {
width: 64%;
}
.j-w-65 {
width: 65%;
}
.j-w-66 {
width: 66%;
}
.j-w-67 {
width: 67%;
}
.j-w-68 {
width: 68%;
}
.j-w-69 {
width: 69%;
}
.j-w-70 {
width: 70%;
}
.j-w-71 {
width: 71%;
}
.j-w-72 {
width: 72%;
}
.j-w-73 {
width: 73%;
}
.j-w-74 {
width: 74%;
}
.j-w-75 {
width: 75%;
}
.j-w-76 {
width: 76%;
}
.j-w-77 {
width: 77%;
}
.j-w-78 {
width: 78%;
}
.j-w-79 {
width: 79%;
}
.j-w-80 {
width: 80%;
}
.j-w-81 {
width: 81%;
}
.j-w-82 {
width: 82%;
}
.j-w-83 {
width: 83%;
}
.j-w-84 {
width: 84%;
}
.j-w-85 {
width: 85%;
}
.j-w-86 {
width: 86%;
}
.j-w-87 {
width: 87%;
}
.j-w-88 {
width: 88%;
}
.j-w-89 {
width: 89%;
}
.j-w-90 {
width: 90%;
}
.j-w-91 {
width: 91%;
}
.j-w-92 {
width: 92%;
}
.j-w-93 {
width: 93%;
}
.j-w-94 {
width: 94%;
}
.j-w-95 {
width: 95%;
}
.j-w-96 {
width: 96%;
}
.j-w-97 {
width: 97%;
}
.j-w-98 {
width: 98%;
}
.j-w-99 {
width: 99%;
}
.j-w-100 {
width: 100% !important;
}
/* 高100栅格*/
.j-h-0 {
height: 0
}
.j-h-1 {
height: 1%;
}
.j-h-2 {
height: 2%;
}
.j-h-3 {
height: 3%;
}
.j-h-4 {
height: 4%;
}
.j-h-5 {
height: 5%;
}
.j-h-6 {
height: 6%;
}
.j-h-7 {
height: 7%;
}
.j-h-8 {
height: 8%;
}
.j-h-9 {
height: 9%;
}
.j-h-10 {
height: 10%;
}
.j-h-11 {
height: 11%;
}
.j-h-12 {
height: 12%;
}
.j-h-13 {
height: 13%;
}
.j-h-14 {
height: 14%;
}
.j-h-15 {
height: 15%;
}
.j-h-16 {
height: 16%;
}
.j-h-17 {
height: 17%;
}
.j-h-18 {
height: 18%;
}
.j-h-19 {
height: 19%;
}
.j-h-20 {
height: 20%;
}
.j-h-21 {
height: 21%;
}
.j-h-22 {
height: 22%;
}
.j-h-23 {
height: 23%;
}
.j-h-24 {
height: 24%;
}
.j-h-25 {
height: 25%;
}
.j-h-26 {
height: 26%;
}
.j-h-27 {
height: 27%;
}
.j-h-28 {
height: 28%;
}
.j-h-29 {
height: 29%;
}
.j-h-30 {
height: 30%;
}
.j-h-31 {
height: 31%;
}
.j-h-32 {
height: 32%;
}
.j-h-33 {
height: 33%;
}
.j-h-34 {
height: 34%;
}
.j-h-35 {
height: 35%;
}
.j-h-36 {
height: 36%;
}
.j-h-37 {
height: 37%;
}
.j-h-38 {
height: 38%;
}
.j-h-39 {
height: 39%;
}
.j-h-40 {
height: 40%;
}
.j-h-41 {
height: 41%;
}
.j-h-42 {
height: 42%;
}
.j-h-43 {
height: 43%;
}
.j-h-44 {
height: 44%;
}
.j-h-45 {
height: 45%;
}
.j-h-46 {
height: 46%;
}
.j-h-47 {
height: 47%;
}
.j-h-48 {
height: 48%;
}
.j-h-49 {
height: 49%;
}
.j-h-50 {
height: 50%;
}
.j-h-51 {
height: 51%;
}
.j-h-52 {
height: 52%;
}
.j-h-53 {
height: 53%;
}
.j-h-54 {
height: 54%;
}
.j-h-55 {
height: 55%;
}
.j-h-56 {
height: 56%;
}
.j-h-57 {
height: 57%;
}
.j-h-58 {
height: 58%;
}
.j-h-59 {
height: 59%;
}
.j-h-60 {
height: 60%;
}
.j-h-61 {
height: 61%;
}
.j-h-62 {
height: 62%;
}
.j-h-63 {
height: 63%;
}
.j-h-64 {
height: 64%;
}
.j-h-65 {
height: 65%;
}
.j-h-66 {
height: 66%;
}
.j-h-67 {
height: 67%;
}
.j-h-68 {
height: 68%;
}
.j-h-69 {
height: 69%;
}
.j-h-70 {
height: 70%;
}
.j-h-71 {
height: 71%;
}
.j-h-72 {
height: 72%;
}
.j-h-73 {
height: 73%;
}
.j-h-74 {
height: 74%;
}
.j-h-75 {
height: 75%;
}
.j-h-76 {
height: 76%;
}
.j-h-77 {
height: 77%;
}
.j-h-78 {
height: 78%;
}
.j-h-79 {
height: 79%;
}
.j-h-80 {
height: 80%;
}
.j-h-81 {
height: 81%;
}
.j-h-82 {
height: 82%;
}
.j-h-83 {
height: 83%;
}
.j-h-84 {
height: 84%;
}
.j-h-85 {
height: 85%;
}
.j-h-86 {
height: 86%;
}
.j-h-87 {
height: 87%;
}
.j-h-88 {
height: 88%;
}
.j-h-89 {
height: 89%;
}
.j-h-90 {
height: 90%;
}
.j-h-91 {
height: 91%;
}
.j-h-92 {
height: 92%;
}
.j-h-93 {
height: 93%;
}
.j-h-94 {
height: 94%;
}
.j-h-95 {
height: 95%;
}
.j-h-96 {
height: 96%;
}
.j-h-97 {
height: 97%;
}
.j-h-98 {
height: 98%;
}
.j-h-99 {
height: 99%;
}
.j-h-100 {
height: 100%;
}
.j-w-h-100 {
height: 100%;
width: 100% !important;
}
</style>
</head>
<body>
<!-- 添加和修改的弹出层开始 -->
<div style="padding: 20px" id="saveOrUpdateDiv">
<form class="layui-form" method="post" lay-filter="formTestFilter">
<input hidden name="id" id="id" value="${zybpxjyda.id}">
<input hidden name="eId" id="eId" value="${zybpxjyda.enterpriseid}">
<input hidden name="eName" id="eName" value="${zybpxjyda.enterpriseName}">
<div class="j-column-center j-w-h-100">
<%-- <div class="layui-form-item j-w-50">
<label class="layui-form-label j-nowrap">项目名称</label>
<div class="layui-input-block">
<input lay-reqtext="请填写项目名称"
type="text" name="daname" id="daname" lay-verify="required" autocomplete="off" placeholder="请填写项目名称" value="${zybpxjyda.daname}" class="isDisabled layui-input">
</div>
</div>--%>
<div class="layui-form-item j-w-100">
<label class="layui-form-label">劳动者上岗前培训</label>
<div class="j-row-left">
<div class="layui-input-block clearBox" style="margin-left: 0px;padding-left: 0px;">
<span class="xs" id="xs"></span>
<button type="button" class="layui-btn isDisabled" id="uploadfile1"><i class="layui-icon"></i>上传文件</button>
<%-- <img class="imgSc" id="fileImg01" style="display: none" src="${ctxStatic}/images/scImg.png">--%>
<!-- 隐藏的input,一个隐藏的input(用于保存文件url) -->
<input type="hidden" id="gqpx" name="gqpx" value="${zybpxjyda.gqpx}" class="isDisabled"/>
</div>
<div class="layui-form-item j-w-30">
<label class="layui-form-label j-nowrap ">报告时间</label>
<div class="layui-input-block j-row-left ">
<input type="text" name="gqpxTime" id="gqpxTime"
readonly="readonly" autocomplete="off"
class="isDisabled j-w-100 layui-input "value="<fmt:formatDate value="${zybpxjyda.gqpxTime}" pattern="yyyy-MM-dd" />">
</div>
</div>
</div>
</div>
<div class="layui-form-item j-w-100">
<label class="layui-form-label">在岗期间定期培训</label>
<div class="j-row-left">
<div class="layui-input-block clearBox" style="margin-left: 0px;padding-left: 0px;">
<span class="xs" id="xs1"></span>
<button type="button" class="layui-btn uploadfile" id="uploadfile2"><i class="layui-icon"></i>上传文件</button>
<input type="hidden" class="isDisabled" id="dqpx" name="dqpx" value="${zybpxjyda.dqpx}"/>
</div>
<div class="layui-form-item j-w-30">
<label class="layui-form-label j-nowrap ">报告时间</label>
<div class="layui-input-block j-row-left ">
<input type="text" name="dqpxTime" id="dqpxTime"
readonly="readonly" autocomplete="off"
class="isDisabled j-w-100 layui-input "value="<fmt:formatDate value="${zybpxjyda.dqpxTime}" pattern="yyyy-MM-dd" />">
</div>
</div>
<div class="layui-form-item j-w-30">
<label class="layui-form-label j-nowrap ">下次培训时间</label>
<%-- <div class="layui-input-block j-row-left ">
<input type="text" name="dqpxNextTime" id="dqpxNextTime"
readonly="readonly" autocomplete="off"
class="isDisabled j-w-100 layui-input "value="<fmt:formatDate value="${zybpxjyda.dqpxNextTime}" pattern="yyyy-MM-dd" />">
</div>--%>
<div class="layui-input-block">
<%--<input type="radio" name="radioReportPeriod" lay-filter="radioReportPeriod" value="半年" title="半年" >--%>
<input type="radio" name="radioReportPeriod" lay-filter="radioReportPeriod" value="一年" title="一年" >
<%--<input type="radio" name="radioReportPeriod" lay-filter="radioReportPeriod" value="两年" title="两年" >
<input type="radio" name="radioReportPeriod" lay-filter="radioReportPeriod" value="三年" title="三年" >--%>
<input type="hidden" id="reportPeriod" name="reportPeriod" value="一年">
<%-- <input type="text" lay-verify="required" name="nextpjtime" id="nextpjtime" readonly="readonly"--%>
<%-- autocomplete="off" class="layui-input isDisabled" value="<fmt:formatDate value="${zybqy.nexttjtime}" pattern="yyyy-MM-dd" />">--%>
<div style="margin-top: 5px">
<input type="text" style="border-width:0px; font-size:16px;color: #009688; font-weight: bold" lay-filter="dqpxNextTime" name="dqpxNextTime" id="dqpxNextTime" value="" readonly="readonly" class="layui-input isDisabled"/></div>
</div>
</div>
</div>
</div>
<div class="layui-form-item j-w-100">
<label class="layui-form-label">用人单位主要负责人、职业卫生管理人员培训</label>
<div class="j-row-left">
<div class="layui-input-block clearBox" style="margin-left: 0px;padding-left: 0px;">
<span class="xs" id="xs2"></span>
<button type="button" class="layui-btn uploadfile" id="uploadfile3"><i class="layui-icon"></i>上传文件</button>
<input type="hidden" class="isDisabled" id="gxrpx" name="gxrpx" value="${zybpxjyda.gxrpx}"/>
</div>
<div class="layui-form-item j-w-30">
<label class="layui-form-label j-nowrap ">报告时间</label>
<div class="layui-input-block j-row-left ">
<input type="text" name="glrpxTime" id="glrpxTime"
readonly="readonly" autocomplete="off"
class="isDisabled j-w-100 layui-input "value="<fmt:formatDate value="${zybpxjyda.glrpxTime}" pattern="yyyy-MM-dd" />">
</div>
</div>
<div class="layui-form-item j-w-30">
<label class="layui-form-label j-nowrap ">下次培训时间</label>
<%-- <div class="layui-input-block j-row-left ">
<input type="text" name="glrpxNextTime" id="glrpxNextTime"
readonly="readonly" autocomplete="off"
class="isDisabled j-w-100 layui-input "value="<fmt:formatDate value="${zybpxjyda.glrpxNextTime}" pattern="yyyy-MM-dd" />">
</div>--%>
<div class="layui-input-block">
<%-- <input type="radio" name="radioReportPeriod1" lay-filter="radioReportPeriod1" value="半年" title="半年" >--%>
<input type="radio" name="radioReportPeriod1" lay-filter="radioReportPeriod1" value="一年" title="一年" >
<%--<input type="radio" name="radioReportPeriod1" lay-filter="radioReportPeriod1" value="两年" title="两年" >
<input type="radio" name="radioReportPeriod1" lay-filter="radioReportPeriod1" value="三年" title="三年" >--%>
<input type="hidden" id="reportPeriodgl" name="reportPeriodgl" value="一年">
<%-- <input type="text" lay-verify="required" name="nextpjtime" id="nextpjtime" readonly="readonly"--%>
<%-- autocomplete="off" class="layui-input isDisabled" value="<fmt:formatDate value="${zybqy.nexttjtime}" pattern="yyyy-MM-dd" />">--%>
<div style="margin-top: 5px">
<input type="text" style="border-width:0px; font-size:16px;color: #009688; font-weight: bold" lay-filter="glrpxNextTime" name="glrpxNextTime" id="glrpxNextTime" value="" readonly="readonly" class="layui-input isDisabled"/></div>
</div>
</div>
</div>
</div>
<div class="j-row-left">
</div>
<div class="j-row-center ">
<div class="layui-form-item">
<div class="layui-input-block">
<a style="text-decoration: underline; color: blue;" onclick=down()>年度职业卫生宣传培训一览表模板</a>
<%-- <input lay-filter="zwkzCheckBox" id="zwkz0" type="checkbox" name="zwkz" lay-skin="primary" title="暂未开展" value="1">--%>
<button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</div>
</div>
<div class="layui-form-item" hidden>
<input type="text" id="enterpriseid" name="enterpriseid">
</div>
<%-- <div class="layui-form-item" hidden>
<input type="text" id="jhysId" name="jhysId">
</div>--%>
</form>
</div>
<script src="${ctxStatic}/layui-v2.4.5/layui/layui.js"></script>
<script src="${ctxStatic}/common/dayjs.min.js"></script>
<script type="text/javascript">
function down() {
var urlFast = window.location.protocol + "//" + window.location.host + "/";
window.location.href = urlFast + '/dzzyb/uploadFile/年度职业卫生宣传培训一览表.docx'
}
$(function () {
<c:if test="${zybpxjyda.gqpx != null && zybpxjyda.gqpx != ''}">
$("#gqpx").after("<i class=\"layui-icon layui-icon-ok\" style=\"color: #24bcff; font-size: 30px;\"></i>");
</c:if>
<c:if test="${zybpxjyda.dqpx != null && zybpxjyda.dqpx != ''}">
$("#dqpx").after("<i class=\"layui-icon layui-icon-ok\" style=\"color: #24bcff; font-size: 30px;\"></i>");
</c:if>
<c:if test="${zybpxjyda.gxrpx != null && zybpxjyda.gxrpx != ''}">
$("#gxrpx").after("<i class=\"layui-icon layui-icon-ok\" style=\"color: #24bcff; font-size: 30px;\"></i>");
</c:if>
})
function qiyename() {
layer.open({
title: "选择企业",
type: 2,
area: ['70%', '70%'],
maxmin: true, //开启最大化最小化按钮
content: '${ctx}/zyb/logon/qiyemsg',
btn: ['确定', '关闭'],
yes: function (index, layero) {
/* var body = layer.getChildFrame('body', index);//获取子页面内容
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
var data=iframeWin.layui.table.checkStatus('userTable').data;
alert(data)*/
/* var iframeWindow = window['layui-layer-iframe '+ index]
var data = iframeWindow.layui.table.checkStatus('userTable').data
alert("ddd")*/
/*alert(data)*/
var iframeWindow = window[layero.find('iframe')[0]['name']];
var params = iframeWindow.layui.table.checkStatus('testReload').data;
console.log("获取选中页面的数据" + params[0].id);
console.log("获取选中页面的数据" + params[0].companyName);
document.getElementById('qyname').value = params[0].companyName;
document.getElementById('enterpriseid').value = params[0].id;
layer.close(index);
}
});
}
layui.use(['table', 'layer', 'form', 'laydate', 'upload'], function () {
$("input[type='radio']").attr('checked',true);
var table = layui.table;
var layer = layui.layer;
var form = layui.form;
var laydate = layui.laydate;
var upload = layui.upload;
InitBasicInfo();
function InitBasicInfo() {
form.val("formTestFilter", {
/* "radioReportPeriod": `${zybpxjyda.reportPeriod}`,
"reportPeriod": `${zybpxjyda.reportPeriod}`,*/
"dqpxNextTime":'<fmt:formatDate value="${zybpxjyda.dqpxNextTime}" pattern="yyyy-MM-dd" />',
/*"radioReportPeriod1": `${zybpxjyda.reportPeriodgl}`,
"reportPeriodgl": `${zybpxjyda.reportPeriodgl}`,*/
"glrpxNextTime":'<fmt:formatDate value="${zybpxjyda.glrpxNextTime}" pattern="yyyy-MM-dd" />'
});
}
//绑定时间选择器
laydate.render({
elem: '#gqpxTime'
, trigger: 'click'
,max:'nowTime'
});
laydate.render({
elem: '#dqpxTime'
,trigger: 'click'
,max:'nowTime'
,done: function(value, date, endDate){ // 选择完毕的回调
var a=$("#reportPeriod").val();
if($("#reportPeriod").val()=="")
return false;
//计算日期
CalcNextDate($("#reportPeriod").val(),value);
}
});
laydate.render({
elem: '#glrpxTime'
, trigger: 'click'
,max:'nowTime'
,done: function(value, date, endDate){ // 选择完毕的回调
if($("#reportPeriodgl").val()=="")
return false;
//计算日期
CalcNextDate1($("#reportPeriodgl").val(),value);
}
});
/* laydate.render({
elem: '#dqpxNextTime'
, trigger: 'click'
});
laydate.render({
elem: '#glrpxNextTime'
, trigger: 'click'
});
*/
form.on('radio(radioReportPeriod)', function(data) {
console.log(data);
$("#reportPeriod").val(data.value);
//报告日期为空,不计算
var dataValue =$("#dqpxTime").val();
if($("#dqpxTime").val()=="")
return false;
// top.layer.msg("体检日期不能为空!");
//计算日期
CalcNextDate(data.value,dataValue);
});
function CalcNextDate(dateType,selectDate){
var currentReportDate = selectDate;
if(dateType== "半年")
{
$("#dqpxNextTime").val(dayjs(currentReportDate).add(6,'month').format("YYYY-MM-DD"));
}
else if(dateType== "一年")
{
$("#dqpxNextTime").val(dayjs(currentReportDate).add(1,'year').format("YYYY-MM-DD"));
}
else if(dateType== "两年")
{
$("#dqpxNextTime").val(dayjs(currentReportDate).add(2,'year').format("YYYY-MM-DD"));
}
else if(dateType== "三年")
{
$("#dqpxNextTime").val(dayjs(currentReportDate).add(3,'year').format("YYYY-MM-DD"));
}
}
//管理人员计算方法
form.on('radio(radioReportPeriod1)', function(data) {
console.log(data);
$("#reportPeriodgl").val(data.value);
var dataValue =$("#glrpxTime").val();
//报告日期为空,不计算
if($("#glrpxTime").val()=="")
return false;
// top.layer.msg("体检日期不能为空!");
//计算日期
CalcNextDate1(data.value,dataValue);
});
function CalcNextDate1(dateType,selectDate){
var currentReportDate = selectDate;
if(dateType== "半年")
{
$("#glrpxNextTime").val(dayjs(currentReportDate).add(6,'month').format("YYYY-MM-DD"));
}
else if(dateType== "一年")
{
$("#glrpxNextTime").val(dayjs(currentReportDate).add(1,'year').format("YYYY-MM-DD"));
}
else if(dateType== "两年")
{
$("#glrpxNextTime").val(dayjs(currentReportDate).add(2,'year').format("YYYY-MM-DD"));
}
else if(dateType== "三年")
{
$("#glrpxNextTime").val(dayjs(currentReportDate).add(3,'year').format("YYYY-MM-DD"));
}
}
//渲染数据表格
table.render({
elem: '#userTable' //渲染的目标对象
, id: 'testReload'
, title: '用户数据表'//数据导出来的标题
, height: '500'
, cellMinWidth: 200 //设置列的最小默认宽度
, page: true //是否启用分页
, cols: [[ //列表数据
{type: 'checkbox'}
, {field: 'description', title: '问题反馈列表'}
]]
})
table.reload('testReload', {
url: '${ctx}/sys/dict/queryAllProblem',
page: {
curr: 1 //重新从第 1 页开始
}
});
table.on('checkbox(orders_list)', function (obj) {
console.log(obj)
var checkStatus = table.checkStatus('testReload');
console.log(checkStatus)
console.log(checkStatus.data[0].description)//选中行数据
console.log(checkStatus.data.length)
});
form.on('checkbox(zwkzCheckBox)', function (data) {
if (data.elem.checked) {
$("#file_url").next().remove();
$("#saveOrUpdateDiv").find(".isDisabled").prop({'disabled': true}).attr('lay-verify', '').val("");
} else {
$("#saveOrUpdateDiv").find(".isDisabled").prop({'disabled': false}).attr('lay-verify', 'required');
}
});
//监听提交
form.on('submit(demo1)', function (data) {
if(data.field.gqpx === "" && data.field.dqpx === "" && data.field.gxrpx === ""){
layer.msg("请上传文件!");
flag = false;
return false;
}else if(data.field.gqpx !== ""&& data.field.gqpxTime===""){
layer.msg("请选择劳动者上岗前培训的报告时间!");
flag = false;
return false;
}else if( data.field.dqpx !== ""&& data.field.dqpxTime===""){
layer.msg("请选择在岗期间定期培训的报告时间!");
flag = false;
return false;
}else if(data.field.gxrpx !== ""&& data.field.glrpxTime===""){
layer.msg("请选择用人单位主要负责人、职业卫生管理人员培训的报告时间!");
flag = false;
return false;
}
var pjxx = {
id:$("#id").val(),
enterpriseid:$("#eId").val(),
enterprisename:$("#eName").val(),
gqpx: data.field.gqpx,
dqpx: data.field.dqpx,
gxrpx: data.field.gxrpx,
gqpxTime: data.field.gqpxTime,
dqpxTime: data.field.dqpxTime,
glrpxTime: data.field.glrpxTime,
dqpxNextTime: data.field.dqpxNextTime,
glrpxNextTime: data.field.glrpxNextTime,
daname: data.field.daname,
reportPeriod:data.field.reportPeriod,
reportPeriodgl:data.field.reportPeriodgl
};
/**
* 执行新增
*/
$.ajax({
url: "${ctx}/zyb/logon/insertQyxcjyda", //请求的url地址
dataType: "json",
async: false,//请求是否异步,默认为异步,这也是ajax重要特性
data: pjxx, //参数值
type: "POST", //请求方式
success: function (req) {
/* alert("fdsfsd")*/
alert(req.mess)
var index1 = top.layer.getFrameIndex(window.name); //获取窗口索引
if(top.frames[top.getActiveTab().attr("name")].active2
&& top.frames[top.getActiveTab().attr("name")].active2.AddComplete2) {
top.frames[top.getActiveTab().attr("name")].active2.AddComplete2(index1);
}
else
{
window.parent.location.reload();//刷新父页面
var index2 = parent.layer.getFrameIndex(window.name); //获取窗口索引
parent.layer.close(index2)
}
},
complete: function () {
//请求完成的处理
},
error: function (error) {
}
});
//刷新父页面
return false;
});
upload.render({
elem: '#uploadfile1' //+idVal
,url: '${ctx}/zyb/ar/uploadFile'
,accept: 'file' //文件
,
before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
console.log(obj);
layer.load(); //上传loading
}
,done: function(res){
layer.closeAll('loading');
console.log(res)
//如果上传失败
if(res.code > 0){
alert("上传失败"+res.data.src);
return layer.msg('上传失败');
}
//上传成功
// alert("上传成功"+res.data.src);
$("#fileImg01").css("display","block");
document.getElementById("gqpx").value = res.data.src;
//$("#zwkz0").attr({"disabled":true});
$("#xs").text(res.bm);
return layer.msg('上传成功');
}
});
upload.render({
elem: '#uploadfile2' //+idVal
,url: '${ctx}/zyb/ar/uploadFile'
,accept: 'file' //文件
,/*exts: 'pdf|docx|doc', //文件*/
/* ,auto: false*/
/* ,bindAction: '#uploadfileBtn'*/
before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
console.log(obj);
layer.load(); //上传loading
}
,done: function(res){
layer.closeAll('loading');
console.log(res)
//如果上传失败
if(res.code > 0){
alert("上传失败"+res.data.src);
return layer.msg('上传失败');
}
//上传成功
// alert("上传成功"+res.data.src);
document.getElementById("dqpx").value = res.data.src;
$("#xs1").text(res.bm);
return layer.msg('上传成功');
}
});
upload.render({
elem: '#uploadfile3' //+idVal
,url: '${ctx}/zyb/ar/uploadFile'
,accept: 'file' //文件
,/*exts: 'pdf|docx|doc', //文件*/
/* ,auto: false*/
/* ,bindAction: '#uploadfileBtn'*/
before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
console.log(obj);
layer.load(); //上传loading
}
,done: function(res){
layer.closeAll('loading');
console.log(res)
//如果上传失败
if(res.code > 0){
alert("上传失败"+res.data.src);
return layer.msg('上传失败');
}
//上传成功
// alert("上传成功"+res.data.src);
document.getElementById("gxrpx").value = res.data.src;
$("#xs2").text(res.bm);
return layer.msg('上传成功');
}
});
})
function woshi() {
var a = layui.table.checkStatus('userTable').data;
alert("ddddd" + a + "aabb")
}
</script>
</body>
</html>