- 견적요청등록 팝업 신규 개발 (estimateRegistFormPopup.jsp) * S/N 관리 기능 (개별 추가, 연속번호 생성) * 유/무상, 품번, 품명, 수량, 환율 등 필드 추가 * actionType=view 시 닫기 버튼만 표시 - 견적관리 리스트 검색조건 추가 * 주문유형, 제품구분, 국내/해외, 고객사 * 유/무상, 품번, 품명, S/N * 접수일, 요청납기일 기간 검색 * 결재상태 - 결재상신 버튼 기능 수정 - 결재 상태 컬럼 추가 및 결재 상세 팝업 연동 - contractBase SQL에 견적관리 필드 추가
478 lines
18 KiB
Plaintext
478 lines
18 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 connector = person.getUserId();
|
|
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<!-- //JSTL 페이징 변수선언 -->
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
|
|
<c:set var="connector" value="<%=connector %>" />
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
//날짜
|
|
_fnc_datepick();
|
|
|
|
|
|
$('.select2').select2();
|
|
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
//SR자료등록 팝업
|
|
$(".File").click(function(){
|
|
var popup_width = 800;
|
|
var popup_height = 335;
|
|
|
|
var objId = $(this).attr("data-OBJID");
|
|
var docType =$(this).attr("data-docType");
|
|
var docTypeName = $(this).attr("data-docTypeName");
|
|
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
|
var url = "/projectConcept/FileRegistPopup.do"+params;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
});
|
|
|
|
//영업활동 등록 팝업
|
|
$(".btnRegist").click(function(){
|
|
var popup_width = 1200;
|
|
var popup_height = 550;
|
|
var params = "?actionType=regist"
|
|
var url = "/contractMgmt/contracMgmtFormPopup.do"+params;
|
|
//window.open("/ordermgmt/ordermgmtUpdateFormPopup.do"+params, "", "width=650, height=750","menubars=no, scrollbars=yes, resizable=yes");
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
});
|
|
|
|
|
|
//고객 등록 팝업
|
|
$(".supplyMng").click(function(){
|
|
//window.open("/ordermgmt/ordermgmtUpdateFormPopup.do"+params, "", "width=650, height=750","menubars=no, scrollbars=yes, resizable=yes");
|
|
window.open("/contractMgmt/supplyMngPagingList.do", "", "width=1150, height=676","menubars=no, scrollbars=yes, resizable=yes");
|
|
});
|
|
|
|
|
|
//엔터 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
|
|
//삭제
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
|
|
|
|
$("#btnExcel").click(function(){
|
|
document.form1.actionType.value = "excel";
|
|
document.form1.action = "/contractMgmt/contractList.do";
|
|
document.form1.submit();
|
|
});
|
|
|
|
fn_search();
|
|
});
|
|
|
|
var columns = [
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '영업번호', field : 'CONTRACT_NO', frozen:true,
|
|
formatter:fnc_createGridAnchorTag,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
fn_projectConceptDetail(objid);
|
|
}
|
|
},
|
|
{title:"영업정보(상세)", headerHozAlign:'center', //고객정보
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '계약구분', field : 'CATEGORY_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '차수', field : 'OVERHAUL_ORDER'},
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '국내/해외', field : 'AREA_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '고객사', field : 'CUSTOMER_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '제품구분', field : 'PRODUCT_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '기계형식', field : 'MECHANICAL_TYPE' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '고객사 프로젝트명', field : 'CUSTOMER_PROJECT_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '예상납기일', field : 'DUE_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '입고지', field : 'LOCATION' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '셋업지', field : 'SETUP' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '설비방향', field : 'FACILITY_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '설비대수', field : 'FACILITY_QTY' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '설비타입', field : 'FACILITY_TYPE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '설비길이', field : 'FACILITY_DEPTH' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '담당자', field : 'WRITER_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '등록일', field : 'REG_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '첨부파일', field : 'CU01_CNT',
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
var docType = 'contractMgmt01';
|
|
var docTypeName = 'contractMgmt01';
|
|
fn_FileRegist(objid, docType, docTypeName);
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{title:"진행사항", headerHozAlign:'center',
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '검토내용', field : 'CU03_CNT',
|
|
formatter:fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
|
fn_projectConceptReviewDetail(objid);
|
|
}
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '상태', field : 'CONTRACT_RESULT_NAME' }
|
|
]
|
|
},
|
|
{title:"수주정보", headerHozAlign:'center',
|
|
columns:[
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '수주일', field : 'CONTRACT_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : 'PO계약 No', field : 'PO_NO' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '70', title : 'PM', field : 'PM_USER_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '70', title : '통화', field : 'CONTRACT_CURRENCY_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '수주가', field : 'CONTRACT_PRICE_CURRENCY',
|
|
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false,},
|
|
},
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '170', title : '당사프로젝트명', field : 'PROJECT_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '계약납기일', field : 'CONTRACT_DEL_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '요청납기일', field : 'REQ_DEL_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '수주회사', field : 'CONTRACT_COMPANY_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '제작공장', field : 'MANUFACTURE_PLANT_NAME' }
|
|
]
|
|
}
|
|
];
|
|
|
|
//var grid;
|
|
function fn_search(){
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/contractMgmt/contractGridList.do", columns, true);
|
|
}
|
|
|
|
function _fnc_datepick(){
|
|
var $dateinput = $("input.date_icon");
|
|
for(var i=0; i<$dateinput.length; i++){
|
|
$dateinput.eq(i).attr("size","10");
|
|
$dateinput.eq(i).datepicker({
|
|
changeMonth:true,
|
|
changeYear:true
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_delete(){
|
|
var checkedObj = _tabulGrid.getSelectedData();
|
|
if(0 < checkedObj.length){
|
|
var objId = fnc_checkNull(checkedObj[0].OBJID);
|
|
//if(confirm("선택한 정보를 삭제하시겠습니까?")){
|
|
Swal.fire({
|
|
title: '선택한 고객정보를 삭제하시겠습니까?',
|
|
text: '',
|
|
icon: 'warning',
|
|
|
|
showCancelButton: true, // cancel버튼 보이기. 기본은 원래 없음
|
|
confirmButtonColor: '#3085d6', // confrim 버튼 색깔 지정
|
|
cancelButtonColor: '#d33', // cancel 버튼 색깔 지정
|
|
confirmButtonText: '확인', // confirm 버튼 텍스트 지정
|
|
cancelButtonText: '취소', // cancel 버튼 텍스트 지정
|
|
reverseButtons: false, // 버튼 순서 거꾸로
|
|
|
|
}).then(result => {
|
|
// 만약 Promise리턴을 받으면,
|
|
if (result.isConfirmed) { // 만약 모달창에서 confirm 버튼을 눌렀다면
|
|
//var param = $("#form1").serialize();
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/contractMgmt/deleteContractMngInfo.do",
|
|
data: {
|
|
"objId":objId
|
|
},
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result == 'true'){
|
|
Swal.fire("삭제되었습니다.");
|
|
fn_search();
|
|
};
|
|
}
|
|
,error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire("선택한 항목이 없습니다.");
|
|
}
|
|
}
|
|
|
|
function fn_FileRegist(objId, docType, docTypeName){
|
|
var popup_width = 800;
|
|
var popup_height = 300;
|
|
|
|
var objId = objId;
|
|
var docType = docType;
|
|
var docTypeName = docTypeName;
|
|
var params = "?targetObjId="+objId+"&docType="+docType+"&docTypeName="+docTypeName;
|
|
var url = "/projectConcept/FileRegistPopup.do"+params;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
//영업활동등록 상세
|
|
function fn_projectConceptDetail(objId){
|
|
var popup_width = 1200;
|
|
var popup_height = 550;
|
|
var url = "/contractMgmt/contracMgmtFormPopup.do?objId="+objId;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
//검토내용 상세
|
|
function fn_projectConceptReviewDetail(objId){
|
|
var popup_width = 800;
|
|
var popup_height = 250;
|
|
var url = "/contractMgmt/contracMgmtReviewFormPopup.do?objId="+objId;
|
|
|
|
fn_centerPopup(popup_width, popup_height, url);
|
|
}
|
|
|
|
//코드값을 받아와서 동적으로 selectbox 생성
|
|
function optionJobGroup(code){
|
|
var val=code;
|
|
var params = "";
|
|
var option="";
|
|
var combobox = $("#writer");
|
|
combobox.empty();
|
|
if(val!=""){
|
|
params += "codeId="+val;
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/projectConcept/makewrite.do",
|
|
data : params,
|
|
dataType:"json",
|
|
async: false,
|
|
success: function(data){
|
|
if(data.RESULT !=""){
|
|
option += "<option value=''>전체</option>";
|
|
option += data.RESULT;
|
|
combobox.append(option);
|
|
}
|
|
}
|
|
});
|
|
// alert(Number(lev-1));
|
|
//$("#code"+Number(lev-1)).val(code).prop("selected", true);
|
|
}else{
|
|
|
|
option += "<option value=''>전체</option>";
|
|
combobox.append(option);
|
|
}
|
|
}
|
|
|
|
|
|
//코드값을 받아와서 동적으로 selectbox 생성
|
|
function makeSelect(code){
|
|
var val=code;
|
|
var params = "";
|
|
var option="";
|
|
var combobox = $("#outc_cd6_td");
|
|
combobox.empty();
|
|
|
|
|
|
/* <select name="outc_cd6" id="outc_cd6" type="select">
|
|
<option value="">선택</option>
|
|
</select> */
|
|
|
|
if(val!="" && val!="PLA03000"){
|
|
params += "codeId="+val;
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/ordermgmt/makeCodeselect.do",
|
|
data : params,
|
|
dataType:"json",
|
|
async: false,
|
|
success: function(data){
|
|
if(data.RESULT !=""){
|
|
option += "<select name='outc_cd6' id='outc_cd6' type='select'>"
|
|
option += "<option value=''>선택</option>";
|
|
option += data.RESULT;
|
|
option += "</select>";
|
|
combobox.append(option);
|
|
$("#outc_cd6").val("${param.outc_cd6}");
|
|
//$("#outc_cd6").select2();
|
|
}
|
|
}
|
|
});
|
|
}else{
|
|
if(val=="PLA03000"){
|
|
option += "<input type='text' name='outc_cd6' id='outc_cd6' value='${param.outc_cd6}'>"
|
|
combobox.append(option);
|
|
}else{
|
|
option += "<select name='outc_cd6' id='outc_cd6' type='select'>"
|
|
option += "<option value=''>선택</option>";
|
|
option += "</select>";
|
|
combobox.append(option);
|
|
//$("#outc_cd6").select2();
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
function saveexcelpop() {
|
|
|
|
var partLength = $("input[name=partCheckBox]:checked").length;
|
|
if(partLength == 0){
|
|
Swal.fire('선택된 영업정보가 없습니다.');
|
|
return;
|
|
}
|
|
if(partLength > 1){
|
|
Swal.fire('단건씩 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
var orderobjId ="";
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
|
orderobjId = fnc_checkNull($(this).attr("data-objId").replace(" ",""));
|
|
});
|
|
|
|
var url = "/ordermgmt/openOrderExcelImportPopUp.do?orderobjId="+orderobjId;
|
|
var target = "openOrderExcelImportPopUp";
|
|
window.open(url, target,"width=1245, height=700, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
|
|
|
|
//프로젝트의 form,detail 팝업을 보여준다.
|
|
function openProjectFormPopUp(objId){
|
|
window.open("","projectFormPopUp","width=1150, height=676");
|
|
var params = "?actionType=regist"
|
|
var url = "/project/projectFormPopUp.do"+params;
|
|
if("" != objId){
|
|
url = "/project/projectDetailPopUp.do";
|
|
}
|
|
var form = document.form1;
|
|
form.objId.value = objId;
|
|
form.action = url;
|
|
form.target = "projectFormPopUp";
|
|
form.submit();
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body class="bodyNoScroll">
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="actionType" value="" />
|
|
|
|
<!-- 대시보드용 -->
|
|
<input type="hidden" name="contract_month" id="contract_month" value="${param.contract_month}">
|
|
<div class="min_part_enroll">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span>영업관리_계약관리</span>
|
|
</h2>
|
|
<div class="btnArea">
|
|
<input type="button" value="삭제" class="plm_btns delete" id="btnDelete">
|
|
<input type="button" value="등록" class="plm_btns btnRegist create">
|
|
<!-- <input type="button" value="고객등록" class="plm_btns supplyMng create"> -->
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch" name="btnSearch">
|
|
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
|
</div>
|
|
</div>
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tr>
|
|
|
|
<td><label for="Year">년도</label></td>
|
|
<td>
|
|
<select name="Year" id="Year" class="select2" autocomplete="off" style="width:130px">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
|
|
<option value="${req_year}"${param.Year eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
|
|
|
|
<td><label for="category_cd">계약구분</label></td>
|
|
<td>
|
|
<select name="category_cd" id="category_cd" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.category_cd}
|
|
</select>
|
|
</td>
|
|
|
|
|
|
<td><label for="customer_objid">고객사</label></td>
|
|
<td>
|
|
<select name="customer_objid" id="customer_objid" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.customer_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="product">제품구분</label></td>
|
|
<td>
|
|
<select name="product" id="product" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.product_cd}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<%-- <td><label for="status_cd">진행사항</label></td>
|
|
<td>
|
|
<select name="status_cd" id="status_cd" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.status_cd}
|
|
</select>
|
|
</td> --%>
|
|
|
|
<td class="align_r">
|
|
<label>계약일</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="contract_start_date" id="contract_start_date" style="width:90px;" autocomplete="off" value="${param.contract_start_date}" class="date_icon">~
|
|
<input type="text" name="contract_end_date" id="contract_end_date" style="width:90px;" autocomplete="off" value="${param.contract_end_date}" class="date_icon">
|
|
</td>
|
|
|
|
<td><label for="result_cd">수주결과</label></td>
|
|
<td>
|
|
<select name="contract_result" id="contract_result" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.result_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="pm_user_id">PM</label></td>
|
|
<td>
|
|
<select name="pm_user_id" id="pm_user_id" style="width:130px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.pm_user_id}
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |