File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
File name
Commit message
Commit date
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
response.setHeader("Cache-Control","no-store");
response.setHeader("Pragma","no-cache");
response.setDateHeader("Expires",0);
if (request.getProtocol().equals("HTTP/1.1")) response.setHeader("Cache-Control", "no-cache");
%>
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<title>참여사업불러오기</title>
<link rel="stylesheet" href="/direct/css/font.css">
<link rel="stylesheet" href="/direct/css/reset.css">
<link rel="stylesheet" href="/direct/css/enroll_popup.css">
<link rel="stylesheet" href="/direct/css/nice-select.css">
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="/direct/css/ie_popup.css" />
<![endif]-->
<script src="/direct/js/jquery-1.11.3.min.js"></script>
<script src="/direct/js/jquery-ui.min.js"></script>
<script src="/direct/js/jquery.nice-select.js"></script>
<script src="/direct/js/script.js"></script>
<script src="/direct/js/popup_open_2.js"></script>
<script type="text/javascript" src="/js/audit/jquery.form.min.js"></script>
<script>
$(document).ready(function() {
$('select').niceSelect();
});
function total_check(object){
if($(object).is(':checked')){
$('#companyBusinessList').find('input[type=checkbox]').prop("checked", true);
}else{
$('#companyBusinessList').find('input[type=checkbox]').prop("checked", false);
}
}
function searchBusiness(){
var searchKeyword = $('#searchKeyword').val();
var companyId = $('#companyId').val();
$.ajax({
type: "POST",
url: "/uss/itsm/company/selectCompanyBusinessAjax.do",
data:{ "searchKeyword": searchKeyword, "companyId":companyId },
dataType:'jsonp',
cache: false,
async: false,
success: function (returnData, status) {
if(status == 'success'){
if(returnData.result == 'fail'){
alert("조회에 실패하였습니다.");
}else if(returnData.result == 'auth_fail'){
alert("세션이 종료되었습니다.");
}else if(returnData.result =='success'){
var searchBusinessInfo = returnData.companyBusinessList;
$("#companyBusinessList > tr").remove();
if(searchBusinessInfo.length == 0){
var tempTr = "<tr class='noSerchTr'>";
tempTr += "<td class='noSerch'>검색 내역이 없습니다.</td>";
tempTr += "</tr>";
$("#companyBusinessList").append(tempTr);
}else{
for(var i=0; i < searchBusinessInfo.length; i++){
var tableIndex = Number(i)+1;
var tempCompanyBusinessTable = $('#temp_company_business_table').clone();
tempCompanyBusinessTable = tempCompanyBusinessTable.find('tr') ;
tempCompanyBusinessTable.addClass('item_td_temp') ; //추가 행에 class 추가
$("#companyBusinessList").append(tempCompanyBusinessTable);
$('.item_td_temp').find("td").each(function(index, item){ //추가한 행에 id 세팅함.
if($(this).attr('id') == 'temp_company_business_checkbox'){
var check="<input type='checkbox' name='business' id='bus_"+tableIndex+"' value='"+searchBusinessInfo[i].businessId+"'>"
check+="<label for='bus_"+tableIndex+"'></label>"
$(this).html(check);
}
if($(this).attr('id') == 'temp_company_business_cd'){
var business_cd="";
if(searchBusinessInfo[i].companyBusinessCD == 'bizCd_01'){
business_cd="물품";
}else if(searchBusinessInfo[i].companyBusinessCD == 'bizCd_02'){
business_cd="공사";
}else if(searchBusinessInfo[i].companyBusinessCD == 'bizCd_03'){
business_cd="용역";
}else if(searchBusinessInfo[i].companyBusinessCD == 'bizCd_04'){
business_cd="기타";
}
$(this).text(business_cd);
}
if($(this).attr('id') == 'temp_company_business_nm'){
var business_nm="["+searchBusinessInfo[i].companyBusinessNO+"]"+searchBusinessInfo[i].companyBusinessNM;
$(this).text(business_nm);
}
if($(this).attr('id') == 'temp_company_business_DAY'){
var day = searchBusinessInfo[i].companyBusinessSTRDAY +"<br>~"+ searchBusinessInfo[i].companyBusinessENDDAY
$(this).html(day);
}
if($(this).attr('id') == 'temp_company_business_companyNM'){
$(this).text(searchBusinessInfo[i].companyBusinessCompanyNM);
}
});
$('.item_td_temp').attr('class' , searchBusinessInfo[i].businessId) ; //td 클래스 이름변경
}
}
}
}else{
alert("생성에 실패하였습니다.");
}
},
error: function (e) {
alert("생성에 실패하였습니다.");
}
});
}
/* 등록버튼 클릭시 임시파일들 N으로 업데이트 */
function insertBusiness(){
if($("input[name=business]:checked").length == 0){
alert("선택된 항목이 없습니다.");
return;
}
if(!confirm("등록하시겠습니까?")){
return false;
}
var frm = document.listForm;
var data = new FormData(frm);
$.ajax({
type: "POST",
url: "/uss/itsm/company/insertCompanyBusinessAjax.do",
data: data,
dataType:'jsonp',
async: false,
processData: false,
contentType: false,
cache: false,
timeout: 600000,
success: function (returnData, status) {
if(status == 'success'){
if(returnData.result == 'fail'){
alert("등록에 실패하였습니다.");
}else if(returnData.result == 'auth_fail'){
alert("세션이 종료되었습니다.");
if(opener !=null){
opener.location.reload();
}
window.self.close() ;
}else if(returnData.result =='success'){
alert("등록되었습니다.");
if(opener != null){
opener.self_reload();
}
window.self.close() ;
}
}else{
alert("등록에 실패하였습니다.");
}
},
error: function (e) {
alert("등록에 실패하였습니다.");
}
});
}
</script>
</head>
<body>
<form name="listForm" id="listForm" action="<c:url value='/uss/itsm/audit/SciTecAuditList.do'/>" method="post">
<input type="hidden" name="companyId" id = "companyId" value="${companyMngVO.companyId}"/>
<div class="enroll_popup enterprise_call_popup">
<div class="enroll_popup_title asset_popup_title">
<img src="/direct/img/enroll_popup_title_bg.png" alt=""> 참여사업 불러오기
<!-- <div class="enroll_popup_title_btns">
<ul>
<li><img src="/direct/img/popup_little_icon.png" alt=""></li>
<li><img src="/direct/img/popup_full_icon.png" alt=""></li>
<li><img src="/direct/img/popup_close_icon.png" alt=""></li>
</ul>
</div> -->
</div>
<div class="enroll_input_left asset_exposure_list">
<ul>
<li>
검  색
<input type="text" class="business_call_serch" id="searchKeyword" name="searchKeyword" title="검색" />
<input type="button" value="검색" class="serch_btn" onclick="searchBusiness()">
</li>
<li>
<div class="enterprise_right_table">
<table>
<thead>
<tr>
<th>
<input type="checkbox" id="all" onclick="total_check(this);" c>
<label for="all"></label>
</th>
<th>구분</th>
<th>사업명</th>
<th>사업기간</th>
<th class="bisEnterTable">계약업체</th>
</tr>
</thead>
<tbody id="companyBusinessList">
<c:forEach var="companyBusinessInfo" items="${companyBusinessList}" varStatus="status">
<tr>
<td>
<input type="checkbox" name="business" id="bus_${status.index}" value="${companyBusinessInfo.businessId}">
<label for="bus_${status.index}"></label>
</td>
<c:choose>
<c:when test="${companyBusinessInfo.companyBusinessCD eq 'bizCd_01'}">
<td>물품</td>
</c:when>
<c:when test="${companyBusinessInfo.companyBusinessCD eq 'bizCd_02'}">
<td>공사</td>
</c:when>
<c:when test="${companyBusinessInfo.companyBusinessCD eq 'bizCd_03'}">
<td>용역</td>
</c:when>
<c:when test="${companyBusinessInfo.companyBusinessCD eq 'bizCd_04'}">
<td>기타</td>
</c:when>
<c:otherwise>
<td>-</td>
</c:otherwise>
</c:choose>
<td><span class="bisListTitle">[${companyBusinessInfo.companyBusinessNO}]${companyBusinessInfo.companyBusinessNM}</span></td>
<td>${companyBusinessInfo.companyBusinessSTRDAY}
<br>~
${companyBusinessInfo.companyBusinessENDDAY}
</td>
<td class="bisEnterTable">${companyBusinessInfo.companyBusinessCompanyNM} </td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</li>
</ul>
</div>
<div class="main1_btn_div">
<input type="button" class="save_btn" value="저장" onclick="insertBusiness()">
<input type="button" class="close_btn" value="닫기" onclick="window.self.close()"/>
</div>
</div>
<input type="hidden" name="asd">
</form>
<table id="temp_company_business_table" style="display: none">
<tr>
<td id="temp_company_business_checkbox"></td>
<td id="temp_company_business_cd"></td>
<td id="temp_company_business_nm"></td>
<td id="temp_company_business_DAY"></td>
<td id="temp_company_business_companyNM"></td>
</tr>
</table>
<form name="searchForm" method="get" action="<c:url value='/uss/itsm/company/selectCompanyBusinessAjax.do'/>">
<input name="pageIndex" type="hidden" value="1" />
<input name="searchCondition" type="hidden" />
<input name="searchKeyword" type="hidden" />
<input name="pageUnit" type="hidden" value="10" />
<input name="sortOrder" type="hidden"/>
</form>
</body>
</html>