326 lines
11 KiB
Plaintext
326 lines
11 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<%
|
|
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
|
|
String userId = CommonUtils.checkNull(person.getUserId());
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
</head>
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
$("#btnComplete").click(function(){
|
|
fn_changeStatus("complete","이행완료");
|
|
});
|
|
$("#btnRelease").click(function(){
|
|
fn_changeStatus("release","배포");
|
|
});
|
|
$("#btnReg").click(function(){
|
|
fn_openInstructionMngFormPopUp("");
|
|
});
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
$("#btnSearch").click(function(){
|
|
fn_search();
|
|
});
|
|
|
|
fnc_getCodeListAppend("<%=Constants.DIVISION_CODE%>","SEARCH_DIVISION","");
|
|
fnc_getCodeListAppend("<%=Constants.CLASS_CODE%>","SEARCH_CLASS","");
|
|
|
|
fnc_datepick();
|
|
$('.select2').select2();
|
|
|
|
fn_search();
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
/* 지시사항 이행관리 팝업 */
|
|
function fn_openInstructionMngFormPopUp(objId){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/dashboard/instructionMngFormPopUp2.do";
|
|
var target = "instructionMngFormPopUp";
|
|
//window.open(url,target,"width=1300, height=700, menubars=no, scrollbars=yes, resizable=yes");
|
|
fn_centerPopup(1300, 700, url, target);
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.OBJID.value = objId;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
function fn_changeStatus(changeStatus,changeStatusTitle){
|
|
|
|
//var checkedRow = $("input[name=chkObj]:checked");
|
|
//var checkedRow = _tabulGrid.getSelectedRows();
|
|
var checkedRow = _tabulGrid.getSelectedData();
|
|
if(0 < checkedRow.length){
|
|
|
|
var checkArr = new Array();
|
|
var ngCnt = 0;
|
|
//console.log("checkedObj:"+checkedObj);
|
|
|
|
for(var i=0;i<checkedRow.length;i++){
|
|
//console.log("checkedRow:",checkedRow[i]);
|
|
var objId = fnc_checkNull(checkedRow[i].OBJID);
|
|
var currentStatus = fnc_checkNull(checkedRow[i].STATUS);
|
|
var writer = fnc_checkNull(checkedRow[i].WRITER);
|
|
//alert(currentStatus);
|
|
|
|
if(writer != "${connectUserId}"){
|
|
ngCnt++;
|
|
Swal.fire("본인이 작성한 건만 "+changeStatusTitle+"할 수 있습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(changeStatus == "release" && currentStatus != "create"){ // || writer != "${connectUserId}"
|
|
ngCnt++;
|
|
Swal.fire("등록중인 건만 "+changeStatusTitle+"할 수 있습니다.");
|
|
return false;
|
|
}else{
|
|
}
|
|
|
|
if(changeStatus == "complete" && currentStatus == "complete"){
|
|
ngCnt++;
|
|
Swal.fire("이행완료된 건입니다.");
|
|
return false;
|
|
}
|
|
|
|
checkArr.push(objId);
|
|
}
|
|
if(0 < ngCnt){
|
|
//Swal.fire("등록중인 건만 "+changeStatusTitle+"할 수 있습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(confirm("선택된 내용을 "+changeStatusTitle+" 처리 하시겠습니까?")){
|
|
|
|
$.ajax({
|
|
url:"/dashboard/changeStatusInstructionMng2.do",
|
|
type:"POST",
|
|
//data:$("#form1").serialize()+"&STATUS="+changeStatus,
|
|
data: { "checkArr":checkArr.join()
|
|
,"STATUS":changeStatus
|
|
},
|
|
dataType:"json",
|
|
beforeSend:function(){
|
|
_startLoading("Loading...");
|
|
},
|
|
complete:function(){
|
|
_endLoading();
|
|
},
|
|
success:function(data){
|
|
alert(data.msg);
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
alert("선택된 내용이 없습니다.");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
function fn_delete(){
|
|
//var checkedRow = $("input[name=chkObj]:checked");
|
|
var checkedRow = _tabulGrid.getSelectedData();
|
|
if(0 < checkedRow.length){
|
|
|
|
var checkArr = new Array();
|
|
var ngCnt = 0;
|
|
//console.log("checkedObj:"+checkedObj);
|
|
|
|
for(var i=0;i<checkedRow.length;i++){
|
|
//console.log("checkedRow:",checkedRow[i]);
|
|
var objId = fnc_checkNull(checkedRow[i].OBJID);
|
|
var currentStatus = fnc_checkNull(checkedRow[i].STATUS);
|
|
var writer = fnc_checkNull(checkedRow[i].WRITER);
|
|
//alert(currentStatus);
|
|
|
|
if(writer != "${connectUserId}"){
|
|
Swal.fire("본인이 작성한 건만 삭제할 수 있습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(currentStatus != "create"){ //
|
|
ngCnt++;
|
|
}else{
|
|
}
|
|
|
|
checkArr.push(objId);
|
|
}
|
|
if(0 < ngCnt){
|
|
Swal.fire("등록중인 건만 삭제할 수 있습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(confirm("선택된 내용을 삭제하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/dashboard/deleteInstructionMng2.do",
|
|
type:"POST",
|
|
data: { "checkArr":checkArr.join()
|
|
},
|
|
dataType:"json",
|
|
success:function(data){
|
|
alert(data.msg);
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
alert("선택된 내용이 없습니다.");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
var columns = [
|
|
{title:"지시사항", headerHozAlign:'center', //고객정보
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : ' ', field : 'STATUS', visible:false },
|
|
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '구분 ', field : 'DIVISION_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '분류 ', field : 'CLASS_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '주차 ', field : 'YEAR_MONTH_WEEK',
|
|
formatter:fnc_createGridAnchorTag,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
fn_openInstructionMngFormPopUp(objId);
|
|
}
|
|
},
|
|
//{headerHozAlign : 'center', hozAlign : 'left', /*width : '100',*/ title : '제목 ', field : 'TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '50', title : '건수', field : 'TASK_CNT', headerSort:true,
|
|
/*
|
|
formatter:fnc_createGridAnchorTag,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
fn_openInstructionMngFormPopUp(objId);
|
|
}
|
|
*/
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '작성자', field : 'WRITER_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center ', width : '80', title : '등록일 ', field : 'REG_DATE_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '상태', field : 'STATUS_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', /* width : '110', */ title : '조치담당자 ', field : 'MEASURE_USER_NAMES' },
|
|
<%--
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '85', title : '조치팀1 ', field : 'MEASURE_DEPT_TITLE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '조치팀2 ', field : 'MEASURE_DEPT_TITLE1' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '조치팀3 ', field : 'MEASURE_DEPT_TITLE1' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '조치팀4 ', field : 'MEASURE_DEPT_TITLE1' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '조치팀5 ', field : 'MEASURE_DEPT_TITLE1' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '조치예정일 ', field : 'MEASURE_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '이행내역 ', field : 'FILE_CNT' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', /*width : '100',*/ title : '이행결과 ', field : 'STATUS_TITLE' },
|
|
--%>
|
|
],
|
|
},
|
|
{title:"이행결과", headerHozAlign:'center',
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '조치완료 ', field : 'TASK_CNT_DONE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '진행중 ', field : 'TASK_CNT_ING' },
|
|
{headerHozAlign : 'center', hozAlign : 'center ', width : '60', title : '미결 ', field : 'TASK_CNT_DELAY' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '첨부파일 ', field : 'FILE_CNT', headerSort:false,
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
var docType = 'INSTRUCTION_MNG2_TASK_FILE';
|
|
var docTypeName = 'INSTRUCTION_MNG2_TASK_FILE';
|
|
//fnc_fileRegist(objid, docType, docTypeName);
|
|
var searchAllInParent = true;
|
|
fnc_fileDetailPopup('', docType, docTypeName, objid, searchAllInParent);
|
|
}
|
|
},
|
|
],
|
|
}
|
|
];
|
|
|
|
function fn_search(){
|
|
/*
|
|
var form1 = document.form1;
|
|
form1.action = "/dashboard/instructionMngListPopUp.do";
|
|
form1.submit();
|
|
*/
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/dashboard/instructionMngList2Paging.do", columns, true);
|
|
}
|
|
|
|
</script>
|
|
<style>
|
|
.input_title {border-left:1px solid #ccc;}
|
|
.input_sub_title {border-left:1px solid #ccc;}
|
|
.pmsPopupForm tr:last-child td{border-bottom:1px solid #ccc;}
|
|
</style>
|
|
<body>
|
|
<form name="hiddenForm" id="hiddenForm">
|
|
<input type="hidden" name="PROJECT_OBJID" id="PROJECT_OBJID" value="${param.PROJECT_OBJID}">
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
|
</form>
|
|
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="PROJECT_OBJID" id="PROJECT_OBJID" value="${param.PROJECT_OBJID}">
|
|
<section>
|
|
<div class="plm_menu_name_gdnsi" style="">
|
|
<h2>
|
|
<span>지시사항 이행관리</span>
|
|
</h2>
|
|
|
|
<div class="btnArea">
|
|
<!--
|
|
-->
|
|
<input type="button" value="조회" id="btnSearch" class="plm_btns">
|
|
<input type="button" value="배포" id="btnRelease" class="plm_btns">
|
|
<input type="button" value="이행완료" id="btnComplete" class="plm_btns">
|
|
<input type="button" value="삭제" id="btnDelete" class="plm_btns">
|
|
<input type="button" value="등록" id="btnReg" class="plm_btns">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tbody>
|
|
<tr>
|
|
<td><label for="Year">년도</label></td>
|
|
<td>
|
|
<select name="SEARCH_YEAR" id="SEARCH_YEAR" style="width:200px;" autocomplete="off">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
|
|
<option value="${req_year}"${param.SEARCH_YEAR eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
<td><label for="">구분</label></td>
|
|
<td>
|
|
<select name="SEARCH_DIVISION" id="SEARCH_DIVISION" style="width:200px;" autocomplete="off" class="select2"></select>
|
|
</td>
|
|
<td><label for="">분류</label></td>
|
|
<td>
|
|
<select name="SEARCH_CLASS" id="SEARCH_CLASS" style="width:200px;" autocomplete="off" class="select2"></select>
|
|
</td>
|
|
<td>
|
|
<input type="checkbox" name="SEARCH_INCLUDE_COMPLETE" id="SEARCH_INCLUDE_COMPLETE" value="INCLUDE" ${'INCLUDE' eq param.SEARCH_INCLUDE_COMPLETE ? 'checked' : ''}><label for="SEARCH_INCLUDE_COMPLETE" style='background:none;padding-left:0px'>이행완료 포함</label>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |