| | |
| | | </li> |
| | | <li style="display: flex;align-items: center"> |
| | | <label>整改部门:</label> |
| | | <!-- <select name="rectifyDeptIdLedger">--> |
| | | <!-- <option value="">所有</option>--> |
| | | <!-- <option th:each="dept : ${deptList}" th:text="${dept.deptName}"--> |
| | | <!-- th:value="${dept.deptId}"></option>--> |
| | | <!-- </select>--> |
| | | <div class="input-group" style="width: 200px"> |
| | | <input name="rectifyDeptIdLedger" type="hidden" id="rectifyDeptIdLedger"> |
| | | <div class="input-group" style="width: 200px;position: relative"> |
| | | <input name="rectifyDeptIdLedger" id="rectifyDeptIdLedger" style="position: absolute;z-index: -1;top: 0;left: 0"> |
| | | <input onclick="selectDangerDeptTree()" id="dangerDeptName" type="text" |
| | | placeholder="请选择部门" class="form-control" required |
| | | readonly="readonly"> |
| | | <span class="input-group-addon"><i class="fa fa-search"></i></span> |
| | | </div> |
| | | </li> |
| | | <li style="display: flex;align-items: center"> |
| | | <label>隐患登记人:</label> |
| | | <div class="input-group" style="width: 200px;position: relative"> |
| | | <input id="registerUserId" name="registerUserId" style="position: absolute;z-index: -1;top: 0;left: 0"> |
| | | <input id="registerUserName" placeholder="请选择登记人" class="form-control" type="text" onclick="selectAcceptUser()" maxlength="30" readonly="true" required> |
| | | <span class="input-group-addon"><i class="fa fa-search"></i></span> |
| | | </div> |
| | | </li> |
| | |
| | | $("#yearOnYearRate").text([[${yearOnYearRate}]]); |
| | | }); |
| | | |
| | | /*验收人 选择 start*/ |
| | | function selectAcceptUser() { |
| | | var url = ctx + "system/user/selectUserListByParentSonCompany"; |
| | | var options = { |
| | | title: '用户选择', |
| | | width: "800", |
| | | url: url, |
| | | }; |
| | | $.modal.openOptionsByCallback(options, function (layero, index) { |
| | | var body = layer.getChildFrame('body', index); |
| | | body.on("click", ".selectUser", function () { |
| | | var userId = $(this).data("userid"); |
| | | var userName = $(this).data("username"); |
| | | $("#registerUserId").val(userId); |
| | | $("#registerUserName").val(userName); |
| | | layer.close(index); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | $(function () { |
| | | var options = { |
| | | url: prefix + "/list", |
| | |
| | | field: 'id', |
| | | title: '隐患检查点ID', |
| | | visible: false |
| | | }, |
| | | { |
| | | field: 'registerCreateTime', |
| | | title: '登记时间' |
| | | }, |
| | | { |
| | | field: 'checkType', |
| | |
| | | label = "验收未通过"; |
| | | } |
| | | } |
| | | if (compareDate(item.rectifyDeadlineTime, item.rectifyCompleteTime)) { |
| | | label += "(按期改)"; |
| | | } else { |
| | | label += "(超期改)"; |
| | | } |
| | | |
| | | } |
| | | } |
| | | return label; |
| | |
| | | if (row.stage) { |
| | | if (row.stage == 3) { |
| | | actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="detailDangerExamine(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> '); |
| | | actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="editType(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a>'); |
| | | if (common == "common") { |
| | | actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | } |
| | |
| | | return actions.join(''); |
| | | } else if (row.stage == 4) { |
| | | actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="detailDangerRectify(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> '); |
| | | actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="editType(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a>'); |
| | | if (common == "common") { |
| | | actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | } |
| | |
| | | return actions.join(''); |
| | | } else if (row.stage == 5) { |
| | | actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="detailDangerAccept(\'' + row.id + '\')"><i class="fa fa-search"></i>查看</a> '); |
| | | |
| | | actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="editType(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a>'); |
| | | if (common == "common") { |
| | | actions.push('<a class="btn btn-danger btn-xs " href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); |
| | | } |
| | | |
| | | return actions.join(''); |
| | | } |
| | | } |
| | |
| | | }; |
| | | $.table.init(options); |
| | | }); |
| | | |
| | | |
| | | var compareDate = function (date1, date2) { |
| | | var oDate1 = new Date(date1); |
| | |
| | | $.modal.open("隐患核查", editDangerExamineUrl.replace("{id}", id)); |
| | | } |
| | | |
| | | /* 隐患核查--修改 */ |
| | | function editType(id) { |
| | | var editTypeUrl = prefix + "/editDangerLevel/{id}"; |
| | | console.log(id,'id') |
| | | $.modal.open("修改", editTypeUrl.replace("{id}", id)); |
| | | } |
| | | |
| | | /* 隐患核查--查看 */ |
| | | function detailDangerExamine(id) { |
| | | var detailDangerExamineUrl = ctx + "tr/hiddenDangerCheck/dangerExamine/detailDangerExamine/{id}"; |