331 lines
9.7 KiB
Plaintext
331 lines
9.7 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>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
|
|
$("#btnSave").click(function(){
|
|
fn_save();
|
|
});
|
|
|
|
$("#btnAdd").click(function(){
|
|
fn_addSchedule();
|
|
});
|
|
|
|
fnc_setFileDropZone("instructionMngDropZone", "${resultMap.OBJID}", "INSTRUCTION_MNG_FILE", "지시사항 이행관리 첨부파일", "fileAreaDraw",false,null,null);
|
|
|
|
fileAreaDraw();
|
|
|
|
fnc_datepick();
|
|
|
|
fnc_getDeptListAppend("MEASURE_DEPT", "${resultMap.MEASURE_DEPT}");
|
|
fnc_getDeptListAppend("MEASURE_DEPT1", "${resultMap.MEASURE_DEPT1}");
|
|
fnc_getDeptListAppend("MEASURE_DEPT2", "${resultMap.MEASURE_DEPT2}");
|
|
fnc_getDeptListAppend("MEASURE_DEPT3", "${resultMap.MEASURE_DEPT3}");
|
|
fnc_getDeptListAppend("MEASURE_DEPT4", "${resultMap.MEASURE_DEPT4}");
|
|
|
|
fnc_getCodeListAppend("<%=Constants.DIVISION_CODE%>","DIVISION","${resultMap.DIVISION}");
|
|
fnc_getCodeListAppend("<%=Constants.CLASS_CODE%>","CLASS","${resultMap.CLASS}");
|
|
|
|
$('.select2').select2();
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
function fileAreaDraw(){
|
|
fn_fileCallback2("instructionMng","INSTRUCTION_MNG_FILE");
|
|
}
|
|
|
|
function fn_fileCallback2(areaId,fileType){
|
|
$.ajax({
|
|
url:"/common/getFileList.do",
|
|
type:"POST",
|
|
data:{"targetObjId":"${resultMap.OBJID}", "docType":fileType},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
if(0 < data.length){
|
|
|
|
//첨부파일 목록 영역 show
|
|
$("#"+areaId+"FileArea").empty();
|
|
|
|
if(0 < $("#"+areaId+"DefaultRow").length){
|
|
$("#"+areaId+"DefaultRow").hide();
|
|
}
|
|
|
|
$.each(data, function(i){
|
|
|
|
var appendText = "";
|
|
var path = data[i].FILE_PATH;
|
|
var fileName = data[i].SAVED_FILE_NAME;
|
|
var deptName = data[i].DEPT_NAME;
|
|
var userName = data[i].USER_NAME;
|
|
var regDate = data[i].REGDATE;
|
|
var fileExt = data[i].UPPER_FILE_EXT;
|
|
var writer = data[i].WRITER;
|
|
|
|
|
|
appendText+= " <tr>";
|
|
appendText+= " <td rowspan='3'>"+[i+1]+"</td>";
|
|
appendText+= " <td class='align_l' rowspan='3'><a href='javascript:fnc_downloadFile(\""+data[i].OBJID+"\")'> "+data[i].REAL_FILE_NAME+"</a>";
|
|
if("${param.actionType}" == "regist" || "plm_admin" == "${connectUserId}" || writer == "${connectUserId}"){
|
|
appendText+= " <a href='javascript:fileDelete(\""+data[i].OBJID+"\",\""+areaId+"\")'><div class='delete_btn'></div></a>";
|
|
|
|
}
|
|
appendText+= " </td>";
|
|
appendText+= " <td>"+deptName+"</td>";
|
|
appendText+= " </tr>";
|
|
|
|
appendText+= " <tr>";
|
|
appendText+= " <td>"+userName+"</td>";
|
|
appendText+= " </tr>";
|
|
appendText+= " <tr>";
|
|
appendText+= " <td>"+regDate+"</td>";
|
|
appendText+= " </tr>";
|
|
|
|
|
|
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
});
|
|
}else{
|
|
$("#"+areaId+"DropZone").show();
|
|
$("#"+areaId+"AttachFileList").hide();
|
|
$("#"+areaId+"FileArea").empty();
|
|
var appendText = "";
|
|
appendText += "<tr>";
|
|
appendText += "<td colspan='3'>첨부 파일이 없습니다.</td>";
|
|
appendText +="</tr>";
|
|
$("#"+areaId+"FileArea").append(appendText);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}//파일 첨부 END
|
|
|
|
/*첨부 파일 삭제 */
|
|
function fileDelete(fileObjId,areaId){
|
|
var type =areaId;
|
|
if(confirm("파일을 삭제하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/common/deleteFileInfo.do",
|
|
type:"POST",
|
|
data:{"objId":fileObjId},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
fileAreaDraw();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_save(){
|
|
|
|
if(fnc_validate('form1')){
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/dashboard/saveInstructionMng.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
alert(data.msg);
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|
|
|
|
</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="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="OBJID" id="OBJID" value="${resultMap.OBJID}">
|
|
<input type="hidden" name="TARGET_OBJID" id="TARGET_OBJID" value="${param.PROJECT_OBJID}">
|
|
<input type="hidden" name="STATUS" id="STATUS" value="${resultMap.STATUS}">
|
|
<section>
|
|
<div class="plm_menu_name" style="display:flex;">
|
|
<h2>
|
|
<span>지시사항 이행관리</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="*">
|
|
<col width="15%">
|
|
<col width="*">
|
|
<col width="15%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">구분</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="DIVISION" id="DIVISION" class="select2"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">분류</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="2">
|
|
<select name="CLASS" id="CLASS" class="select2"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">제목</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="5">
|
|
<input type="text" name="TITLE" id="TITLE" value="${resultMap.TITLE}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">조치팀1</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_DEPT" id="MEASURE_DEPT" class="select2"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치팀2</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_DEPT1" id="MEASURE_DEPT1" class="select2"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치팀3</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_DEPT2" id="MEASURE_DEPT2" class="select2"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">조치팀4</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_DEPT3" id="MEASURE_DEPT3" class="select2"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치팀5</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<select name="MEASURE_DEPT4" id="MEASURE_DEPT4" class="select2"></select>
|
|
</td>
|
|
<td class="input_title">
|
|
<label for="">조치예정일</label>
|
|
</td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="MEASURE_DATE" id="MEASURE_DATE" value="${resultMap.MEASURE_DATE}">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title">
|
|
<label for="">지시사항</label>
|
|
</td>
|
|
<td class="input_sub_title" colspan="5">
|
|
<textarea name="CONTENTS" style="width:99.8%;height:530px;">${resultMap.CONTENTS}</textarea>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="20%">
|
|
<col width="17%">
|
|
<col width="8%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title" colspan="4">
|
|
<label for="">이행내역</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div id="instructionMngDropZone" class="dropzone"style="width:99% !important;"><div class="blink">Drag & Drop Files Here</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="project_form_in_table" style="width:100%" id="problemMngFileAreaTable" >
|
|
<div style="overflow-y:scroll;">
|
|
<table class="" style="width:100%;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td>No</td>
|
|
<td>첨부파일명</td>
|
|
<td>등록</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height:100px;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
</table>
|
|
<table class="fileListscrollTbody" style="width:100% !important;">
|
|
<colgroup>
|
|
<col width="10%">
|
|
<col width="*">
|
|
<col width="20%">
|
|
</colgroup>
|
|
<tbody id="instructionMngFileArea">
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" id="btnSave" class="plm_btns create">
|
|
<input type="button" value="닫기" id="btnClose" class="plm_btns">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |