V2026012702 #126
@@ -152,12 +152,9 @@ $(document).ready(function(){
|
||||
fn_search();
|
||||
});
|
||||
|
||||
// 엑셀 다운로드 - 서버 사이드 방식
|
||||
$("#btnExcel").click(function(){
|
||||
|
||||
$("#search_partNo").val($.trim($("#search_partNo").val()));
|
||||
$("#search_partName").val($.trim($("#search_partName").val()));
|
||||
|
||||
fn_excelExport($("#mainGrid"),"BOM_REPORT_정전개");
|
||||
fn_excelDownload();
|
||||
});
|
||||
|
||||
// 초기 로딩 시 레벨에 따라 표시 (검색 결과 기준)
|
||||
@@ -734,64 +731,44 @@ function fn_search(){
|
||||
|
||||
}
|
||||
|
||||
function fn_excelExport(pGridObj,pFileName){
|
||||
var mya = pGridObj.getDataIDs();
|
||||
var data = pGridObj.getRowData(mya[0]);
|
||||
var colNames=new Array();
|
||||
var ii=0;
|
||||
for (var d in data){ colNames[ii++] = d; }
|
||||
|
||||
//컬럼 헤더 가져오기
|
||||
var columnHeader = pGridObj.jqGrid('getGridParam','colNames') + '';
|
||||
var arrHeader = columnHeader.split(',');
|
||||
var html="<table border=1><tr>";
|
||||
for ( var y = 0; y < arrHeader.length; y++ ) {
|
||||
var hName = arrHeader[y];
|
||||
if("PART_OBJID" == hName || "EO_OBJID" == hName){
|
||||
continue;
|
||||
}
|
||||
|
||||
html = html + "<td><b>" + arrHeader[y] + "</b></td>";
|
||||
}
|
||||
|
||||
|
||||
html = html + "</tr>";
|
||||
|
||||
//값 불러오기
|
||||
for(var i=0;i< mya.length;i++) {
|
||||
var datac= pGridObj.getRowData(mya[i]);
|
||||
html = html +"<tr>";
|
||||
for(var j=0; j< colNames.length;j++){
|
||||
if("PART_OBJID" == colNames[j] || "EO_OBJID" == colNames[j]){
|
||||
continue;
|
||||
}
|
||||
html=html + '<td>' + datac[colNames[j]]+"</td>";
|
||||
}
|
||||
html = html+"</tr>";
|
||||
}
|
||||
|
||||
|
||||
html=html+"</table>"; // end of line at the end
|
||||
document.EXCEL_.csvBuffer.value = html;
|
||||
document.EXCEL_.fileName.value = pFileName;
|
||||
document.EXCEL_.target='_new';
|
||||
document.EXCEL_.submit();
|
||||
// 엑셀 다운로드 - 서버 사이드 방식
|
||||
function fn_excelDownload(){
|
||||
// 검색 조건 확인
|
||||
var partObjId = $("#search_partObjId").val();
|
||||
var partNo = $("#search_partNo").val();
|
||||
var partName = $("#search_partName").val();
|
||||
|
||||
if(!partObjId && !partNo && !partName) {
|
||||
alert("품번 또는 품명을 선택해주세요.");
|
||||
return;
|
||||
}
|
||||
|
||||
var form = document.form1;
|
||||
var searchType = $("#searchType").val();
|
||||
|
||||
// 정전개/역전개에 따라 다른 URL 호출
|
||||
if(searchType == "descending") {
|
||||
form.action = "/partMng/structureDescendingExcelList.do";
|
||||
} else {
|
||||
form.action = "/partMng/structureAscendingExcelList.do";
|
||||
}
|
||||
|
||||
form.target = "_blank";
|
||||
form.submit();
|
||||
form.action = "";
|
||||
form.target = "";
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="backcolor">
|
||||
<form id="EXCEL_" name="EXCEL_" action="/partMng/structureAscendingExcelList.do" method="post">
|
||||
<input type="hidden" name="csvBuffer" id="csvBuffer" value="">
|
||||
<input type="hidden" name="fileName" id="fileName" value="">
|
||||
</form>
|
||||
<form name="hiddenForm" id="hiddenForm" method="post">
|
||||
<input type="hidden" name="OBJID" id="OBJID">
|
||||
</form>
|
||||
<form name="form1" id="form1" action="" method="post">
|
||||
<input type="hidden" name="search" id="search" value="Y">
|
||||
<input type="hidden" name="actionType" id="actionType" value="" />
|
||||
<input type="hidden" name="searchType" id="searchType" value="ascending" />
|
||||
<input type="hidden" name="searchType" id="searchType" value="${empty param.searchType ? 'ascending' : param.searchType}" />
|
||||
<input type="hidden" name="search_partNo_text" id="search_partNo_text" value="${param.search_partNo_text}" />
|
||||
<input type="hidden" name="search_partName_text" id="search_partName_text" value="${param.search_partName_text}" />
|
||||
<div class="min_part_enroll">
|
||||
@@ -807,11 +784,9 @@ function fn_excelExport(pGridObj,pFileName){
|
||||
</c:if>
|
||||
</h2>
|
||||
<div class="btnArea">
|
||||
<!--
|
||||
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
||||
-->
|
||||
<input type="button" value="정전개 조회" class="plm_btns" id="btnSearchAscending">
|
||||
<input type="button" value="역전개 조회" class="plm_btns" id="btnSearchDescending">
|
||||
<input type="button" value="정전개 조회" class="plm_btns" id="btnSearchAscending">
|
||||
<input type="button" value="역전개 조회" class="plm_btns" id="btnSearchDescending">
|
||||
<input type="button" value="Excel Download" class="plm_btns excel" id="btnExcel">
|
||||
</div>
|
||||
</div>
|
||||
<div id="plmSearchZon">
|
||||
|
||||
@@ -9,12 +9,21 @@ java.text.SimpleDateFormat frm= new java.text.SimpleDateFormat ("yyyy_MM_dd_HH_m
|
||||
Calendar cal = Calendar.getInstance();
|
||||
String todayKor = frm.format(cal.getTime());
|
||||
|
||||
String excelName = request.getParameter("fileName");
|
||||
String excelName = "BOM 조회(정전개)";
|
||||
String encodeName = excelName+todayKor+".xls";
|
||||
String fileName = java.net.URLEncoder.encode(encodeName,"UTF-8");
|
||||
|
||||
response.setHeader("Content-Disposition", "attachment;filename="+fileName+"");
|
||||
response.setHeader("Content-Description", "JSP Generated Data");
|
||||
|
||||
ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
|
||||
// MAX_LEVEL 가져오기
|
||||
int maxLevel = 1;
|
||||
if(list != null && list.size() > 0) {
|
||||
HashMap firstMap = (HashMap)list.get(0);
|
||||
maxLevel = Integer.parseInt(CommonUtils.checkNull(firstMap.get("MAX_LEVEL"), "1"));
|
||||
}
|
||||
%>
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
@@ -22,24 +31,101 @@ response.setHeader("Content-Description", "JSP Generated Data");
|
||||
<meta name=ProgId content=Excel.Sheet>
|
||||
<meta name=Generator content="Microsoft Excel 11">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="backcolor">
|
||||
<form name="form1" action="" method="post">
|
||||
<section class="min_part_search">
|
||||
<div class="pdm_menu_name">
|
||||
<h2>
|
||||
<span><%=excelName%></span>
|
||||
<span>BOM 조회(정전개)</span>
|
||||
</h2>
|
||||
</div>
|
||||
<div class="contents_page_basic_margin">
|
||||
<div class="pdm_table_wrap">
|
||||
<%
|
||||
out.println(request.getParameter("csvBuffer"));
|
||||
%>
|
||||
<table class="pdm_table_noImg" style="text-align:center;" border="1">
|
||||
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
|
||||
<%
|
||||
for(int i = 1; i <= maxLevel; i++){
|
||||
%>
|
||||
<td><%=i%></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<td>품번</td>
|
||||
<td>품명</td>
|
||||
<td>수량</td>
|
||||
<td>항목수량</td>
|
||||
<td>3D</td>
|
||||
<td>2D</td>
|
||||
<td>PDF</td>
|
||||
<td>재료</td>
|
||||
<td>열처리경도</td>
|
||||
<td>열처리방법</td>
|
||||
<td>표면처리</td>
|
||||
<td>메이커</td>
|
||||
<td>범주 이름</td>
|
||||
<td>비고</td>
|
||||
</tr>
|
||||
<%
|
||||
if(list != null) {
|
||||
for(int i = 0 ; i < list.size() ; i++){
|
||||
HashMap map = (HashMap)list.get(i);
|
||||
|
||||
int level = Integer.parseInt(CommonUtils.checkNull(map.get("LEVEL"), "1"));
|
||||
String partNo = CommonUtils.checkNull(map.get("PART_NO"));
|
||||
String partName = CommonUtils.checkNull(map.get("PART_NAME"));
|
||||
String qty = CommonUtils.checkNull(map.get("QTY"));
|
||||
String pQty = CommonUtils.checkNull(map.get("P_QTY"));
|
||||
String file3dCnt = CommonUtils.checkNull(map.get("FILE_3D_CNT"), "0");
|
||||
String file2dCnt = CommonUtils.checkNull(map.get("FILE_2D_CNT"), "0");
|
||||
String filePdfCnt = CommonUtils.checkNull(map.get("FILE_PDF_CNT"), "0");
|
||||
String material = CommonUtils.checkNull(map.get("MATERIAL"));
|
||||
String heatTreatmentHardness = CommonUtils.checkNull(map.get("HEAT_TREATMENT_HARDNESS"));
|
||||
String heatTreatmentMethod = CommonUtils.checkNull(map.get("HEAT_TREATMENT_METHOD"));
|
||||
String surfaceTreatment = CommonUtils.checkNull(map.get("SURFACE_TREATMENT"));
|
||||
String maker = CommonUtils.checkNull(map.get("MAKER"));
|
||||
String partTypeTitle = CommonUtils.checkNull(map.get("PART_TYPE_TITLE"));
|
||||
String remark = CommonUtils.checkNull(map.get("REMARK"));
|
||||
|
||||
// 파일 유무 Y/N 표시
|
||||
String has3d = !"0".equals(file3dCnt) ? "Y" : "";
|
||||
String has2d = !"0".equals(file2dCnt) ? "Y" : "";
|
||||
String hasPdf = !"0".equals(filePdfCnt) ? "Y" : "";
|
||||
%>
|
||||
<tr>
|
||||
<%
|
||||
for(int j = 1; j <= maxLevel; j++){
|
||||
if(level == j){
|
||||
%>
|
||||
<td align="center">*</td>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<td></td>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<td style="text-align:left !important;"><%=partNo%></td>
|
||||
<td style="text-align:left !important;"><%=partName%></td>
|
||||
<td align="center"><%=qty%></td>
|
||||
<td align="center"><%=pQty%></td>
|
||||
<td align="center"><%=has3d%></td>
|
||||
<td align="center"><%=has2d%></td>
|
||||
<td align="center"><%=hasPdf%></td>
|
||||
<td style="text-align:left !important;"><%=material%></td>
|
||||
<td style="text-align:left !important;"><%=heatTreatmentHardness%></td>
|
||||
<td style="text-align:left !important;"><%=heatTreatmentMethod%></td>
|
||||
<td style="text-align:left !important;"><%=surfaceTreatment%></td>
|
||||
<td style="text-align:left !important;"><%=maker%></td>
|
||||
<td align="center"><%=partTypeTitle%></td>
|
||||
<td style="text-align:left !important;"><%=remark%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -17,6 +17,13 @@ response.setHeader("Content-Disposition", "attachment;filename="+fileName+"");
|
||||
response.setHeader("Content-Description", "JSP Generated Data");
|
||||
|
||||
ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
|
||||
// MAX_LEVEL 가져오기
|
||||
int maxLevel = 1;
|
||||
if(list != null && list.size() > 0) {
|
||||
HashMap firstMap = (HashMap)list.get(0);
|
||||
maxLevel = Integer.parseInt(CommonUtils.checkNull(firstMap.get("MAX_LEVEL"), "1"));
|
||||
}
|
||||
%>
|
||||
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
|
||||
<head>
|
||||
@@ -24,10 +31,6 @@ ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
<meta name=ProgId content=Excel.Sheet>
|
||||
<meta name=Generator content="Microsoft Excel 11">
|
||||
<title><%=Constants.SYSTEM_NAME%></title>
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body class="backcolor">
|
||||
<form name="form1" action="" method="post">
|
||||
@@ -40,143 +43,87 @@ ArrayList list = (ArrayList)request.getAttribute("LIST");
|
||||
<div class="contents_page_basic_margin">
|
||||
<div class="pdm_table_wrap">
|
||||
<table class="pdm_table_noImg" style="text-align:center;" border="1">
|
||||
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
|
||||
<td>Level</td>
|
||||
<td>품번</td>
|
||||
<td>품명</td>
|
||||
<td>수량</td>
|
||||
<td>단위</td>
|
||||
<td>ECO.No</td>
|
||||
<td>ECO.Date</td>
|
||||
<td>REV</td>
|
||||
<td>ECD</td>
|
||||
<td>ERP</td>
|
||||
<td>재질</td>
|
||||
<td>원소재사이즈</td>
|
||||
<td>도금</td>
|
||||
<td>도장</td>
|
||||
<td>Cavity</td>
|
||||
<td>제품</td>
|
||||
<td>스프루</td>
|
||||
<td>금형구분</td>
|
||||
<td>생산구분</td>
|
||||
<td>금형업체</td>
|
||||
<td>부자재업체</td>
|
||||
<td>도금/도장업체</td>
|
||||
<td>원소재업체</td>
|
||||
<td>비고</td>
|
||||
</tr>
|
||||
<%
|
||||
for(int i = 0 ; i < list.size() ; i++){
|
||||
HashMap map = (HashMap)list.get(i);
|
||||
|
||||
String level = CommonUtils.checkNull(map.get("LEVEL"), "0");
|
||||
String lev = CommonUtils.checkNull(map.get("LEV"));
|
||||
String bomReportObjId = CommonUtils.checkNull(map.get("BOM_REPORT_OBJID"));
|
||||
String topObjId = CommonUtils.checkNull(map.get("TOP_OBJID"));
|
||||
String subTopObjId = CommonUtils.checkNull(map.get("SUB_TOP_OBJID"));
|
||||
String partNo = CommonUtils.checkNull(map.get("PART_NO"));
|
||||
String partName = CommonUtils.checkNull(map.get("PART_NAME"));
|
||||
String qty = CommonUtils.checkNull(map.get("QTY"));
|
||||
String rev = CommonUtils.checkNull(map.get("REV"));
|
||||
String ecoNo = CommonUtils.checkNull(map.get("EO_NO"));
|
||||
String ecoDate = CommonUtils.checkNull(map.get("EO_ISSUE_DATE"));
|
||||
String materialName = CommonUtils.checkNull(map.get("MATERIAL_NAME"));
|
||||
String thickness = CommonUtils.checkNull(map.get("THICKNESS"));
|
||||
String carName = CommonUtils.checkNull(map.get("CAR_NAME"));
|
||||
String carCode = CommonUtils.checkNull(map.get("CAR_CODE"));
|
||||
String productName = CommonUtils.checkNull(map.get("PRODUCT_NAME"));
|
||||
String regionName = CommonUtils.checkNull(map.get("REGION_NAME"));
|
||||
String remarks = CommonUtils.checkNull(map.get("REMARKS"));
|
||||
String ea = "EA";
|
||||
String ecd = CommonUtils.checkNull(map.get("ECD_OBJID"));
|
||||
String erp = CommonUtils.checkNull(map.get("RH_PART_NO"));
|
||||
String plated = CommonUtils.checkNull(map.get("PLATED"));
|
||||
String stamp = CommonUtils.checkNull(map.get("STAMP"));
|
||||
String cavity = CommonUtils.checkNull(map.get("CAVITY"));
|
||||
String weight = CommonUtils.checkNull(map.get("WEIGHT"));
|
||||
String sprue = CommonUtils.checkNull(map.get("SPRUE"));
|
||||
String m_c_name = CommonUtils.checkNull(map.get("M_C_NAME"));
|
||||
String comm_name = CommonUtils.checkNull(map.get("COMM_NAME"));
|
||||
String c_m_name = CommonUtils.checkNull(map.get("C_M_NAME"));
|
||||
String c_s_m_name = CommonUtils.checkNull(map.get("C_S_M_NAME"));
|
||||
String c_p_p_name = CommonUtils.checkNull(map.get("C_P_P_NAME"));
|
||||
String c_e_name = CommonUtils.checkNull(map.get("C_E_NAME"));
|
||||
String background = "";
|
||||
|
||||
//역전개만해당
|
||||
String baseLevel = CommonUtils.checkNull(map.get("BASE_LEVEL"));
|
||||
|
||||
String ecdTitle = "Y";
|
||||
if(ecd == "") ecdTitle = "N";
|
||||
if("1".equals(lev)){
|
||||
background = "#fde9d9";
|
||||
}else if("2".equals(lev)){
|
||||
background = "#daeef3";
|
||||
regionName = "-";
|
||||
}else if("3".equals(lev)){
|
||||
background = "#e4dfec";
|
||||
regionName = "-";
|
||||
}else if("4".equals(lev)){
|
||||
background = "#ebf1de";
|
||||
regionName = "-";
|
||||
}else if("5".equals(lev)){
|
||||
background = "#f2f2f2";
|
||||
regionName = "-";
|
||||
}else if("6".equals(lev)){
|
||||
background = "#f2dcdb";
|
||||
regionName = "-";
|
||||
}else if("7".equals(lev)){
|
||||
background = "#eeece1";
|
||||
regionName = "-";
|
||||
}else if("8".equals(lev)){
|
||||
background = "#dce6f1";
|
||||
regionName = "-";
|
||||
}else if("9".equals(lev)){
|
||||
background = "#FFFFEB";
|
||||
regionName = "-";
|
||||
}else if("10".equals(lev)){
|
||||
background = "#ffffff";
|
||||
regionName = "-";
|
||||
}
|
||||
%>
|
||||
<tr class="dataTr" data-LEVEL="<%=level%>" data-REAL_LEVEL="<%=lev%>" data-BOM_REPORT_OBJID="<%=bomReportObjId%>" data-TOP_OBJID="<%=topObjId%>" data-SUB_TOP_OBJID="<%=subTopObjId%>" style="">
|
||||
<td align="center"><%=baseLevel%></td>
|
||||
<td style="text-align:left !important;">
|
||||
<tr class="pdm_thead" align="center" style="background:yellow; font-weight:bold;">
|
||||
<%
|
||||
for(int j = 0 ; j < Integer.parseInt(level) ; j++){
|
||||
for(int i = 1; i <= maxLevel; i++){
|
||||
%>
|
||||
|
||||
<td><%=i%></td>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
<%=partNo%>
|
||||
</td>
|
||||
<td style="text-align:left !important;" title="<%=partName%>"> <%=partName%></td>
|
||||
<td>품번</td>
|
||||
<td>품명</td>
|
||||
<td>수량</td>
|
||||
<td>항목수량</td>
|
||||
<td>3D</td>
|
||||
<td>2D</td>
|
||||
<td>PDF</td>
|
||||
<td>재료</td>
|
||||
<td>열처리경도</td>
|
||||
<td>열처리방법</td>
|
||||
<td>표면처리</td>
|
||||
<td>메이커</td>
|
||||
<td>범주 이름</td>
|
||||
<td>비고</td>
|
||||
</tr>
|
||||
<%
|
||||
if(list != null) {
|
||||
for(int i = 0 ; i < list.size() ; i++){
|
||||
HashMap map = (HashMap)list.get(i);
|
||||
|
||||
int level = Integer.parseInt(CommonUtils.checkNull(map.get("LEVEL"), "1"));
|
||||
String partNo = CommonUtils.checkNull(map.get("PART_NO"));
|
||||
String partName = CommonUtils.checkNull(map.get("PART_NAME"));
|
||||
String qty = CommonUtils.checkNull(map.get("QTY"));
|
||||
String pQty = CommonUtils.checkNull(map.get("P_QTY"));
|
||||
String file3dCnt = CommonUtils.checkNull(map.get("FILE_3D_CNT"), "0");
|
||||
String file2dCnt = CommonUtils.checkNull(map.get("FILE_2D_CNT"), "0");
|
||||
String filePdfCnt = CommonUtils.checkNull(map.get("FILE_PDF_CNT"), "0");
|
||||
String material = CommonUtils.checkNull(map.get("MATERIAL"));
|
||||
String heatTreatmentHardness = CommonUtils.checkNull(map.get("HEAT_TREATMENT_HARDNESS"));
|
||||
String heatTreatmentMethod = CommonUtils.checkNull(map.get("HEAT_TREATMENT_METHOD"));
|
||||
String surfaceTreatment = CommonUtils.checkNull(map.get("SURFACE_TREATMENT"));
|
||||
String maker = CommonUtils.checkNull(map.get("MAKER"));
|
||||
String partTypeTitle = CommonUtils.checkNull(map.get("PART_TYPE_TITLE"));
|
||||
String remark = CommonUtils.checkNull(map.get("REMARK"));
|
||||
|
||||
// 파일 유무 Y/N 표시
|
||||
String has3d = !"0".equals(file3dCnt) ? "Y" : "";
|
||||
String has2d = !"0".equals(file2dCnt) ? "Y" : "";
|
||||
String hasPdf = !"0".equals(filePdfCnt) ? "Y" : "";
|
||||
%>
|
||||
<tr>
|
||||
<%
|
||||
for(int j = 1; j <= maxLevel; j++){
|
||||
if(level == j){
|
||||
%>
|
||||
<td align="center">*</td>
|
||||
<%
|
||||
} else {
|
||||
%>
|
||||
<td></td>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
<td style="text-align:left !important;"><%=partNo%></td>
|
||||
<td style="text-align:left !important;"><%=partName%></td>
|
||||
<td align="center"><%=qty%></td>
|
||||
<td align="center"><%=ea%></td>
|
||||
<td align="center"><%=ecoNo%></td>
|
||||
<td align="center"><%=ecoDate%></td>
|
||||
<td align="center"><%=rev%></td>
|
||||
<td align="center"><%=ecdTitle%></td>
|
||||
<td align="center"><%=erp%></td>
|
||||
<td align="center"><%=materialName%></td>
|
||||
<td align="center"><%=thickness%></td>
|
||||
<td align="center"><%=plated%></td>
|
||||
<td align="center"><%=stamp%></td>
|
||||
<td align="center"><%=cavity%></td>
|
||||
<td align="center"><%=weight%></td>
|
||||
<td align="center"><%=sprue%></td>
|
||||
<td align="center"><%=m_c_name%></td>
|
||||
<td align="center"><%=comm_name%></td>
|
||||
<td align="center"><%=c_m_name%></td>
|
||||
<td align="center"><%=c_s_m_name%></td>
|
||||
<td align="center"><%=c_p_p_name%></td>
|
||||
<td align="center"><%=c_e_name%></td>
|
||||
<td align="center"><%=remarks%></td>
|
||||
<td align="center"><%=pQty%></td>
|
||||
<td align="center"><%=has3d%></td>
|
||||
<td align="center"><%=has2d%></td>
|
||||
<td align="center"><%=hasPdf%></td>
|
||||
<td style="text-align:left !important;"><%=material%></td>
|
||||
<td style="text-align:left !important;"><%=heatTreatmentHardness%></td>
|
||||
<td style="text-align:left !important;"><%=heatTreatmentMethod%></td>
|
||||
<td style="text-align:left !important;"><%=surfaceTreatment%></td>
|
||||
<td style="text-align:left !important;"><%=maker%></td>
|
||||
<td align="center"><%=partTypeTitle%></td>
|
||||
<td style="text-align:left !important;"><%=remark%></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -41,10 +41,17 @@ String menuName = CommonUtils.getMenuName(menuObjId, "생산계획&실적 관리
|
||||
.select2-selection__rendered {
|
||||
height: 18px !important;
|
||||
}
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
overflow: auto !important;
|
||||
}
|
||||
</style>
|
||||
.select2-container .select2-selection--multiple .select2-selection__rendered {
|
||||
overflow: auto !important;
|
||||
}
|
||||
/* 연두색 컬럼 배경 */
|
||||
.tabulator .tabulator-header .tabulator-col.col-light-green {
|
||||
background-color: #90EE90 !important;
|
||||
}
|
||||
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.col-light-green {
|
||||
background-color: #E8F5E9 !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript">
|
||||
@@ -244,6 +251,7 @@ var columns = [
|
||||
width: 80,
|
||||
title: '완조립',
|
||||
field: 'ASSEMBLY_QTY',
|
||||
cssClass: 'col-light-green',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick: function(e, cell) {
|
||||
fn_openProdResultPopup(cell.getData().OBJID, 'ASSEMBLY');
|
||||
@@ -257,6 +265,7 @@ var columns = [
|
||||
width: 70,
|
||||
title: '검사',
|
||||
field: 'INSPECTION_QTY',
|
||||
cssClass: 'col-light-green',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick: function(e, cell) {
|
||||
fn_openProdResultPopup(cell.getData().OBJID, 'INSPECTION');
|
||||
@@ -270,6 +279,7 @@ var columns = [
|
||||
width: 90,
|
||||
title: '출하대기',
|
||||
field: 'SHIP_WAIT_QTY',
|
||||
cssClass: 'col-light-green',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick: function(e, cell) {
|
||||
fn_openProdResultPopup(cell.getData().OBJID, 'SHIP_WAIT');
|
||||
@@ -283,6 +293,7 @@ var columns = [
|
||||
minWidth: 110,
|
||||
title: '장비조립WBS',
|
||||
field: 'EQUIPMENT_WBS',
|
||||
cssClass: 'col-light-green',
|
||||
formatter:fnc_subInfoValueFormatter,
|
||||
cellClick:function(e, cell){
|
||||
var objid = fnc_checkNull(cell.getData().OBJID);
|
||||
|
||||
@@ -89,17 +89,17 @@ $(document).ready(function(){
|
||||
var columns = [
|
||||
// 요구사항: 품의서 No, 발주서 No, 프로젝트번호, 품번, 품명, 공급업체, 발주수량, 입고수량, 미입고수량, 검사성적서, 입고결과
|
||||
{title:'STATUS' ,field:'STATUS' ,visible:false, frozen:true},
|
||||
{title:'TOTAL_SUPPLY_PRICE' ,field:'TOTAL_SUPPLY_PRICE' ,visible:false, frozen:true},
|
||||
{title:'TOTAL_DELIVERY_PRICE' ,field:'TOTAL_DELIVERY_PRICE' ,visible:false, frozen:true},
|
||||
{title:'TOTAL_NOT_DELIVERY_PRICE',field:'TOTAL_NOT_DELIVERY_PRICE',visible:false, frozen:true},
|
||||
//{title:'TOTAL_SUPPLY_PRICE' ,field:'TOTAL_SUPPLY_PRICE' ,visible:false, frozen:true},
|
||||
//{title:'TOTAL_DELIVERY_PRICE' ,field:'TOTAL_DELIVERY_PRICE' ,visible:false, frozen:true},
|
||||
//{title:'TOTAL_NOT_DELIVERY_PRICE',field:'TOTAL_NOT_DELIVERY_PRICE',visible:false, frozen:true},
|
||||
{title:'FORM_TYPE' ,field:'FORM_TYPE' ,visible:false, frozen:true},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '품의서 No', field : 'PROPOSAL_NO',
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 120, widthGrow : 1, title : '품의서 No', field : 'PROPOSAL_NO',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick : function(e, cell) {
|
||||
fn_openProposalFormPopUp(cell.getData().SALES_REQUEST_OBJID);
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '발주서 No', field : 'PURCHASE_ORDER_NO',
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 120, widthGrow : 1, title : '발주서 No', field : 'PURCHASE_ORDER_NO',
|
||||
formatter:fnc_createGridAnchorTag,
|
||||
cellClick:function(e, cell){
|
||||
var objId = fnc_checkNull(cell.getData().OBJID);
|
||||
@@ -107,10 +107,11 @@ var columns = [
|
||||
fn_formPopUp(objId, formType);
|
||||
}
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 140, widthGrow : 1, title : '프로젝트번호', field : 'PROJECT_NO'},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 130, widthGrow : 1, title : '프로젝트번호', field : 'PROJECT_NO'},
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 140, widthGrow : 2, title : '품번', field : 'PART_NO' },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 180, widthGrow : 3, title : '품명', field : 'PART_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'left', minWidth : 150, widthGrow : 2, title : '공급업체', field : 'PARTNER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 90, widthGrow : 1, title : '구매담당자', field : 'WRITER_NAME' },
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '발주수량', field : 'TOTAL_PO_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
@@ -120,6 +121,15 @@ var columns = [
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고수량', field : 'NON_DELIVERY_QTY',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '발주금액', field : 'TOTAL_SUPPLY_PRICE',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '입고금액', field : 'TOTAL_DELIVERY_PRICE',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'right', minWidth : 90, widthGrow : 1, title : '미입고금액', field : 'TOTAL_NOT_DELIVERY_PRICE',
|
||||
formatter:"money", formatterParams:{thousand:",", symbolAfter:"p", precision:false }
|
||||
},
|
||||
{headerHozAlign : 'center', hozAlign : 'center', minWidth : 100, widthGrow : 1, title : '업체성적서', field : 'INSPECTION_FILE_CNT',
|
||||
formatter:fnc_subInfoValueFormatter,
|
||||
cellClick:function(e, cell){
|
||||
|
||||
@@ -334,7 +334,7 @@ var columns = [
|
||||
}
|
||||
}
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'프로젝트번호', field:'PROJECT_NO',
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1.1, title:'프로젝트번호', field:'PROJECT_NO',
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick: function(e, cell){
|
||||
var orderNo = cell.getData().PROJECT_NO;
|
||||
@@ -342,9 +342,9 @@ var columns = [
|
||||
fn_openSaleRegPopup(orderNo, "detail");
|
||||
}
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'구매유형', field:'PURCHASE_TYPE_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'주문유형', field:'CATEGORY_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'제품구분', field:'PRODUCT_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:0.9, title:'구매유형', field:'PURCHASE_TYPE_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:0.9, title:'주문유형', field:'CATEGORY_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:0.9, title:'제품구분', field:'PRODUCT_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'left', widthGrow:1.5, title:'품번', field:'PART_NO'},
|
||||
{headerHozAlign:'center', hozAlign:'left', widthGrow:2, title:'품명', field:'PART_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'left', widthGrow:1.5, title:'공급업체', field:'PARTNER_NAME'},
|
||||
@@ -364,11 +364,12 @@ var columns = [
|
||||
} else if(value === 'Y'){
|
||||
return '<span style="color:green;">발송완료</span>';
|
||||
} else {
|
||||
return '';
|
||||
return '미발송';
|
||||
}
|
||||
}
|
||||
},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'MAIL_SEND_DATE'}
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'발주일', field:'MAIL_SEND_DATE'},
|
||||
{headerHozAlign:'center', hozAlign:'center', widthGrow:1, title:'구매담당자', field:'WRITER_NAME'}
|
||||
];
|
||||
|
||||
function editCheck (cell) {
|
||||
@@ -1033,12 +1034,27 @@ function fn_executeOrderCancel(objId){
|
||||
<input type="text" name="reg_end_date" id="reg_end_date" style="width:77px;" autocomplete="off" value="${param.reg_end_date }" class="date_icon">
|
||||
</td>
|
||||
|
||||
<td><label for="">주문유형</label></td>
|
||||
<td><label for="">주문유형</label></td>
|
||||
<td><select name="category_cd" id="category_cd" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.category_cd}</select></td>
|
||||
|
||||
<td><label for="">제품구분</label></td>
|
||||
<td><select name="product_cd" id="product_cd" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.product_cd}</select></td>
|
||||
|
||||
|
||||
<td><label for="">구매유형</label></td>
|
||||
<td><select name="purchase_type" id="purchase_type" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.purchase_type}</select></td>
|
||||
|
||||
<td><label for="">구매담당자</label></td>
|
||||
<td><select name="writer" id="writer" class="select2" autocomplete="off" style=""><option value="">선택</option>${code_map.writer}</select></td>
|
||||
|
||||
<td><label for="">메일발송</label></td>
|
||||
<td>
|
||||
<select name="mail_send_yn" id="mail_send_yn" class="select2" autocomplete="off" style="">
|
||||
<option value="">전체</option>
|
||||
<option value="Y" ${param.mail_send_yn eq 'Y' ? 'selected' : ''}>발송완료</option>
|
||||
<option value="N" ${param.mail_send_yn eq 'N' ? 'selected' : ''}>미발송</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -90,6 +90,7 @@ var columns = [
|
||||
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:2, title:'품명', field:'PART_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'left', minWidth:150, widthGrow:2, title:'이슈사항', field:'ISSUE_CONTENT'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'완료요청일', field:'DUE_DATE'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'설변유형', field:'CHANGE_TYPE_NAME'},
|
||||
{headerHozAlign:'center', hozAlign:'center', minWidth:120, widthGrow:1, title:'설계변경요청서', field:'ECR_DOC_CNT',
|
||||
formatter:fnc_subInfoValueFormatter,
|
||||
cellClick:function(e, cell){
|
||||
@@ -359,6 +360,13 @@ function fn_approval(){
|
||||
<input type="text" name="search_complete_date_from" id="search_complete_date_from" class="date_icon" style="width:100px;" autocomplete="off">~
|
||||
<input type="text" name="search_complete_date_to" id="search_complete_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
||||
</td>
|
||||
<td><label>설변유형</label></td>
|
||||
<td>
|
||||
<select name="search_change_type" id="search_change_type" class="select2" style="width:170px;">
|
||||
<option value="">전체</option>
|
||||
${code_map.change_type}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -42,12 +42,14 @@ $(document).ready(function(){
|
||||
var savedActionDept = "${info.action_dept}";
|
||||
var savedRequesterId = "${info.requester_id}";
|
||||
var savedActionManagerId = "${info.action_manager_id}";
|
||||
var savedChangeType = "${info.change_type}";
|
||||
var savedPartNo = "${info.part_no}";
|
||||
var savedPartName = "${info.part_name}";
|
||||
|
||||
if(savedActionDept) $("#ACTION_DEPT").val(savedActionDept).trigger('change');
|
||||
if(savedRequesterId) $("#REQUESTER_ID").val(savedRequesterId).trigger('change');
|
||||
if(savedActionManagerId) $("#ACTION_MANAGER_ID").val(savedActionManagerId).trigger('change');
|
||||
if(savedChangeType) $("#CHANGE_TYPE").val(savedChangeType).trigger('change');
|
||||
|
||||
// 수정 모드: 품번/품명 기존 값 설정
|
||||
if(savedPartNo){
|
||||
@@ -187,6 +189,17 @@ function fn_save(){
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label>설변유형</label></td>
|
||||
<td>
|
||||
<select name="CHANGE_TYPE" id="CHANGE_TYPE" class="select2" type="select" style="width:100%;">
|
||||
<option value="">선택</option>
|
||||
${code_map.change_type}
|
||||
</select>
|
||||
</td>
|
||||
<td class="input_title"><label></label></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<!-- <tr>
|
||||
<td class="input_title"><label>조치담당자</label></td>
|
||||
<td>
|
||||
|
||||
@@ -346,7 +346,9 @@ function fn_save(){
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="input_title"><label>조치부서</label></td>
|
||||
<td colspan="3">${info.action_dept_name}</td>
|
||||
<td>${info.action_dept_name}</td>
|
||||
<td class="input_title"><label>설변유형</label></td>
|
||||
<td>${info.change_type_name}</td>
|
||||
<!-- <td class="input_title"><label>조치담당자</label></td>
|
||||
<td>${info.action_manager_name}</td> -->
|
||||
</tr>
|
||||
|
||||
@@ -44,17 +44,16 @@ String menuName = CommonUtils.getMenuName(menuObjId, "구매관리_품의서관
|
||||
.select2-selection__rendered {
|
||||
height: 18px !important;
|
||||
}
|
||||
/* frozen 컬럼 오른쪽 굵은 선 제거 (헤더) */
|
||||
.tabulator .tabulator-header .tabulator-frozen-left {
|
||||
border-right: none !important;
|
||||
/* 구매유형 멀티선택 - 세로 스크롤 */
|
||||
#purchase_type + .select2-container .select2-selection--multiple {
|
||||
max-height: 52px !important;
|
||||
min-height: 18px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
/* frozen 컬럼 기본 두꺼운 테두리 제거 */
|
||||
.tabulator .tabulator-frozen-left {
|
||||
border-right: none !important;
|
||||
}
|
||||
/* 체크박스 컬럼 오른쪽에 얇은 구분선 추가 (데이터 행만) */
|
||||
.tabulator .tabulator-tableholder .tabulator-table .tabulator-row .tabulator-cell.tabulator-frozen-left {
|
||||
border-right: 1px solid #ddd !important;
|
||||
#purchase_type + .select2-container .select2-selection__rendered {
|
||||
height: auto !important;
|
||||
max-height: 48px !important;
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
@@ -201,7 +200,7 @@ function fn_createPurchaseOrder(selectedRowIds, formType) {
|
||||
var columns = [
|
||||
{title:'OBJID', field:'OBJID', visible: false},
|
||||
{title:'STATUS', field:'STATUS', visible: false},
|
||||
{headerHozAlign:'center', hozAlign:'center', title:"품의서 No", field:"PROPOSAL_NO", widthGrow:1.2, frozen:true,
|
||||
{headerHozAlign:'center', hozAlign:'center', title:"품의서 No", field:"PROPOSAL_NO", widthGrow:1.2,
|
||||
formatter: fnc_createGridAnchorTag,
|
||||
cellClick : function(e, cell) {
|
||||
fn_openProposalFormPopUp(cell.getData().OBJID);
|
||||
@@ -227,6 +226,19 @@ var columns = [
|
||||
|
||||
// 검색
|
||||
function fn_search(){
|
||||
// 기존 hidden 제거
|
||||
$("input[name='purchase_types']").remove();
|
||||
|
||||
// 구매유형 멀티선택 값 처리
|
||||
var selectedPurchaseTypes = $("#purchase_type").val();
|
||||
if(selectedPurchaseTypes && selectedPurchaseTypes.length > 0) {
|
||||
$('<input>').attr({
|
||||
type: 'hidden',
|
||||
name: 'purchase_types',
|
||||
value: selectedPurchaseTypes.join(',')
|
||||
}).appendTo('#form1');
|
||||
}
|
||||
|
||||
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/salesMng/proposalMngGridList.do", columns, true);
|
||||
}
|
||||
|
||||
@@ -292,6 +304,29 @@ function _fnc_datepick(){
|
||||
<input type="text" name="regdate_start" id="regdate_start" style="width:110px;" autocomplete="off" value="${param.regdate_start}" class="date_icon">~
|
||||
<input type="text" name="regdate_end" id="regdate_end" style="width:110px;" autocomplete="off" value="${param.regdate_end}" class="date_icon">
|
||||
</td>
|
||||
<%-- 구매유형 (멀티선택) --%>
|
||||
<td class="align_r"><label for="purchase_type">구매유형</label></td>
|
||||
<td>
|
||||
<select name="purchase_type" id="purchase_type" class="select2" autocomplete="off" style="width:200px;" multiple="multiple">
|
||||
${code_map.purchase_type}
|
||||
</select>
|
||||
</td>
|
||||
<%-- 작성자 --%>
|
||||
<td class="align_r"><label for="writer">작성자</label></td>
|
||||
<td>
|
||||
<select name="writer" id="writer" class="select2" autocomplete="off" style="">
|
||||
<option value="">선택</option>
|
||||
${code_map.writer}
|
||||
</select>
|
||||
</td>
|
||||
<%-- 제품구분 --%>
|
||||
<td class="align_r"><label for="part_type">제품구분</label></td>
|
||||
<td>
|
||||
<select name="part_type" id="part_type" class="select2" autocomplete="off" style="">
|
||||
<option value="">선택</option>
|
||||
${code_map.part_type}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -197,7 +197,7 @@ var columns = [
|
||||
}
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "주문유형", field :"ORDER_TYPE_NAME" , widthGrow:1.1 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "제품구분", field :"PRODUCT_NAME_FULL" , widthGrow:1.1}
|
||||
,{headerHozAlign : 'center', hozAlign : 'left' , title : "고객사", field :"CUSTOMER_NAME" , widthGrow:1.5 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'left' , title : "공급업체", field :"CUSTOMER_NAME" , widthGrow:1.5 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "유/무상", field :"PAID_TYPE_NAME" , widthGrow:0.9 }
|
||||
,{headerHozAlign : 'center', hozAlign : 'left', title : "품번", field :"PART_NO" , widthGrow:1.4}
|
||||
,{headerHozAlign : 'center', hozAlign : 'left' , title : "품명", field :"PART_NAME" , widthGrow:1.8 }
|
||||
@@ -241,7 +241,7 @@ var columns = [
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "요청인", field :"REQUEST_USER_NAME" , widthGrow:1.1,
|
||||
,{headerHozAlign : 'center', hozAlign : 'center', title : "작성자", field :"REQUEST_USER_NAME" , widthGrow:1.1,
|
||||
// 요청인: 구매요청서 작성 시에만 표시
|
||||
formatter: function(cell, formatterParams, onRendered){
|
||||
var data = cell.getData();
|
||||
@@ -1059,8 +1059,40 @@ function fn_executeCreateQuotationRequests(salesRequestObjid, supplyVendorGroups
|
||||
<%-- 작성일 활성화 --%>
|
||||
<td class="align_r"><label>작성일</label></td>
|
||||
<td>
|
||||
<input type="text" name="regdate_start" id="regdate_start" style="width:120px;" autocomplete="off" value="${param.regdate_start}" class="date_icon">~
|
||||
<input type="text" name="regdate_end" id="regdate_end" style="width:120px;" autocomplete="off" value="${param.regdate_end}" class="date_icon">
|
||||
<input type="text" name="regdate_start" id="regdate_start" style="width:110px;" autocomplete="off" value="${param.regdate_start}" class="date_icon">~
|
||||
<input type="text" name="regdate_end" id="regdate_end" style="width:110px;" autocomplete="off" value="${param.regdate_end}" class="date_icon">
|
||||
</td>
|
||||
<%-- 공급업체 --%>
|
||||
<td class="align_r"><label for="customer_cd">공급업체</label></td>
|
||||
<td>
|
||||
<select name="customer_cd" id="customer_cd" class="select2" autocomplete="off" style="width:200px;">
|
||||
<option value="">선택</option>
|
||||
${code_map.customer_cd}
|
||||
</select>
|
||||
</td>
|
||||
<%-- 작성자 --%>
|
||||
<td class="align_r"><label for="request_user">작성자</label></td>
|
||||
<td>
|
||||
<select name="request_user" id="request_user" class="select2" autocomplete="off" style="">
|
||||
<option value="">선택</option>
|
||||
${code_map.request_user}
|
||||
</select>
|
||||
</td>
|
||||
<%-- 제품구분 --%>
|
||||
<td class="align_r"><label for="part_type">제품구분</label></td>
|
||||
<td>
|
||||
<select name="part_type" id="part_type" class="select2" autocomplete="off" style="">
|
||||
<option value="">선택</option>
|
||||
${code_map.part_type}
|
||||
</select>
|
||||
</td>
|
||||
<%-- 프로젝트번호 --%>
|
||||
<td class="align_r"><label for="project_no">프로젝트번호</label></td>
|
||||
<td>
|
||||
<select name="project_no" id="project_no" style="" class="select2" autocomplete="off">
|
||||
<option value="">선택</option>
|
||||
${code_map.project_no}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -19,6 +19,26 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
/* 판매상태 멀티선택 높이 조정 */
|
||||
#salesStatus + .select2-container {
|
||||
min-height: 25px !important;
|
||||
max-height: 25px !important;
|
||||
}
|
||||
#salesStatus + .select2-container .select2-selection--multiple {
|
||||
min-height: 25px !important;
|
||||
max-height: 25px !important;
|
||||
padding: 0 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
#salesStatus + .select2-container .select2-selection__choice {
|
||||
margin-top: 2px;
|
||||
padding: 0 5px;
|
||||
font-size: 11px;
|
||||
}
|
||||
#salesStatus + .select2-container .select2-search--inline .select2-search__field {
|
||||
margin-top: 3px;
|
||||
font-size: 11px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
@@ -390,7 +410,9 @@ var columns = [
|
||||
},
|
||||
// 18. 수주상태
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '수주상태', field : 'ORDER_STATUS'},
|
||||
// 19. 생산상태
|
||||
// 19. 판매상태
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '판매상태', field : 'SALES_STATUS'},
|
||||
// 20. 생산상태
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '생산상태', field : 'PRODUCTION_STATUS'},
|
||||
// 20. 출하지시상태
|
||||
{headerHozAlign : 'center', hozAlign : 'center', width : '90', title : '출하지시상태', field : 'SHIPPING_ORDER_STATUS'},
|
||||
@@ -453,11 +475,12 @@ columns = fnc_applyHeaderAutoWidth(columns);
|
||||
// 데이터 조회 함수
|
||||
function fn_search(){
|
||||
// 디버깅: 검색 파라미터 확인
|
||||
var formData = $("#form1").serializeObject();
|
||||
var formData = $("#form1").serialize();
|
||||
|
||||
// 판매상태 멀티선택 값 별도 추가 (serialize는 multiple select를 제대로 처리함)
|
||||
var salesStatusValues = $("#salesStatus").val();
|
||||
console.log("=== 판매관리 조회 파라미터 ===");
|
||||
console.log("search_partObjId:", formData.search_partObjId);
|
||||
console.log("search_partNo:", formData.search_partNo);
|
||||
console.log("search_partName:", formData.search_partName);
|
||||
console.log("salesStatus 선택값:", salesStatusValues);
|
||||
console.log("전체 파라미터:", formData);
|
||||
|
||||
// 그리드 조회 및 Total 합계 업데이트를 위한 커스텀 AJAX
|
||||
@@ -694,119 +717,80 @@ body {
|
||||
</div>
|
||||
</div>
|
||||
<div id="plmSearchZon">
|
||||
<!-- 검색필터: 주문유형, 발주번호, 고객사, 품번, 품명, S/N, 출하지시상태, 발주일(기간), 출하일(기간) -->
|
||||
<div style="display: flex; flex-wrap: wrap; gap: 10px 15px; align-items: center;">
|
||||
<!-- 주문유형 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>주문유형</label>
|
||||
<select name="orderType" class="select2" style="width:120px;"><option value="">전체</option>${codeMap.orderTypeList}</select>
|
||||
</div>
|
||||
<!-- 발주번호 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>발주번호</label>
|
||||
<input type="text" name="poNo" style="width:100px;"/>
|
||||
</div>
|
||||
<!-- 고객사 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>고객사</label>
|
||||
<select name="customer_objid" id="customer_objid" style="width:150px" class="select2">
|
||||
<option value="">전체</option>
|
||||
${codeMap.customer_cd}
|
||||
</select>
|
||||
</div>
|
||||
<!-- 품번 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>품번</label>
|
||||
<select name="search_partNo" id="search_partNo" class="select2-part" style="width: 120px;">
|
||||
<option value="">품번 선택</option>
|
||||
</select>
|
||||
<input type="hidden" name="search_partObjId" id="search_partObjId" value=""/>
|
||||
</div>
|
||||
<!-- 품명 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>품명</label>
|
||||
<select name="search_partName" id="search_partName" class="select2-part" style="width: 120px;">
|
||||
<option value="">품명 선택</option>
|
||||
</select>
|
||||
</div>
|
||||
<!-- S/N -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>S/N</label>
|
||||
<input type="text" name="serialNo" style="width:100px;"/>
|
||||
</div>
|
||||
<!-- 출하지시상태 -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>출하지시상태</label>
|
||||
<select name="shippingStatus" class="select2" style="width:120px;"><option value="">전체</option>${codeMap.shippingStatusList}</select>
|
||||
</div>
|
||||
<!-- 발주일 (기간) -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>발주일</label>
|
||||
<input type="text" name="orderDateFrom" class="date_icon" style="width:90px;"/> ~
|
||||
<input type="text" name="orderDateTo" class="date_icon" style="width:90px;"/>
|
||||
</div>
|
||||
<!-- 출하일 (기간) -->
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>출하일</label>
|
||||
<input type="text" name="shippingDateFrom" class="date_icon" style="width:90px;"/> ~
|
||||
<input type="text" name="shippingDateTo" class="date_icon" style="width:90px;"/>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td><label for="orderType">주문유형</label></td>
|
||||
<td>
|
||||
<select name="orderType" id="orderType" style="width:120px" class="select2" autocomplete="off">
|
||||
<option value="">전체</option>
|
||||
${codeMap.orderTypeList}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="poNo">발주번호</label></td>
|
||||
<td>
|
||||
<input type="text" name="poNo" id="poNo" style="width:120px">
|
||||
</td>
|
||||
|
||||
<td><label for="customer_objid">고객사</label></td>
|
||||
<td>
|
||||
<select name="customer_objid" id="customer_objid" style="width:230px" class="select2" autocomplete="off">
|
||||
<option value="">전체</option>
|
||||
${codeMap.customer_cd}
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="search_partNo">품번</label></td>
|
||||
<td>
|
||||
<select name="search_partNo" id="search_partNo" class="select2-part" style="width:150px">
|
||||
<option value="">품번 입력하여 검색...</option>
|
||||
</select>
|
||||
<input type="hidden" name="search_partObjId" id="search_partObjId" value="">
|
||||
</td>
|
||||
|
||||
<td><label for="search_partName">품명</label></td>
|
||||
<td>
|
||||
<select name="search_partName" id="search_partName" class="select2-part" style="width:150px">
|
||||
<option value="">품명 입력하여 검색...</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
<td><label for="serialNo">S/N</label></td>
|
||||
<td>
|
||||
<input type="text" name="serialNo" id="serialNo" style="width:100px">
|
||||
</td>
|
||||
|
||||
<td><label for="shippingStatus">출하지시상태</label></td>
|
||||
<td>
|
||||
<select name="shippingStatus" id="shippingStatus" style="width:120px" class="select2" autocomplete="off">
|
||||
<option value="">전체</option>
|
||||
${codeMap.shippingStatusList}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td><label for="orderDateFrom">발주일</label></td>
|
||||
<td>
|
||||
<input type="text" name="orderDateFrom" id="orderDateFrom" autocomplete="off" class="date_icon" style="width:100px">~
|
||||
<input type="text" name="orderDateTo" id="orderDateTo" autocomplete="off" class="date_icon" style="width:100px">
|
||||
</td>
|
||||
|
||||
<td><label for="shippingDateFrom">출하일</label></td>
|
||||
<td>
|
||||
<input type="text" name="shippingDateFrom" id="shippingDateFrom" autocomplete="off" class="date_icon" style="width:100px">~
|
||||
<input type="text" name="shippingDateTo" id="shippingDateTo" autocomplete="off" class="date_icon" style="width:100px">
|
||||
</td>
|
||||
|
||||
<td><label for="salesStatus">판매상태</label></td>
|
||||
<td>
|
||||
<select name="salesStatus" id="salesStatus" style="width:230px; height:25px;" class="select2" multiple="multiple" autocomplete="off">
|
||||
${codeMap.salesStatusList}
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- 주석처리된 검색필터 - 필요시 활성화
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>제품구분</label>
|
||||
<select name="productType" class="select2" style="width:120px;"><option value="">전체</option>${codeMap.productTypeList}</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>국내/해외</label>
|
||||
<select name="nation" class="select2" style="width:100px;">
|
||||
<option value="">전체</option>
|
||||
<option value="0001220">국내</option>
|
||||
<option value="0001221">해외</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>유/무상</label>
|
||||
<select name="paymentType" class="select2" style="width:90px;">
|
||||
<option value="">전체</option>
|
||||
<option value="paid">유상</option>
|
||||
<option value="free">무상</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>수주상태</label>
|
||||
<select name="orderStatus" class="select2" style="width:120px;"><option value="">전체</option>${codeMap.orderStatusList}</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>요청납기</label>
|
||||
<input type="text" name="requestDateFrom" class="date_icon" style="width:90px;"/> ~
|
||||
<input type="text" name="requestDateTo" class="date_icon" style="width:90px;"/>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>출고방법</label>
|
||||
<select name="shippingMethod" class="select2" style="width:100px;">
|
||||
<option value="">전체</option>
|
||||
<option value="DIRECT">직납</option>
|
||||
<option value="PARCEL">택배</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>담당자</label>
|
||||
<select name="manager" class="select2" style="width:120px;"><option value="">전체</option>${codeMap.managerList}</select>
|
||||
</div>
|
||||
<div style="display: flex; align-items: center; gap: 5px;">
|
||||
<label>인도조건</label>
|
||||
<select name="incoterms" class="select2" style="width:100px;">
|
||||
<option value="">전체</option>
|
||||
<option value="EXW">EXW</option>
|
||||
<option value="FOB">FOB</option>
|
||||
<option value="CIF">CIF</option>
|
||||
<option value="DDP">DDP</option>
|
||||
</select>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<!-- Total 합계 표시 영역 (판매원화총액 기준) -->
|
||||
<div style="padding:5px 10px; background: #f5f5f5;">
|
||||
|
||||
@@ -1399,9 +1399,28 @@ public class PartMngController {
|
||||
|
||||
@RequestMapping("/partMng/structureAscendingExcelList.do")
|
||||
public String structureAscendingExcelList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
try {
|
||||
// 정전개 데이터 조회
|
||||
List resultList = partMngService.getStructureAscendingList(request, paramMap);
|
||||
request.setAttribute("LIST", resultList);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/partMng/structureAscendingListExcel";
|
||||
}
|
||||
|
||||
@RequestMapping("/partMng/structureDescendingExcelList.do")
|
||||
public String structureDescendingExcelList(HttpServletRequest request, @RequestParam Map<String, Object> paramMap){
|
||||
try {
|
||||
// 역전개 데이터 조회
|
||||
List resultList = partMngService.getStructureDescendingList(request, paramMap);
|
||||
request.setAttribute("LIST", resultList);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "/partMng/structureDescendingListExcel";
|
||||
}
|
||||
|
||||
/**
|
||||
* 정전개 멀티 목록
|
||||
* @param request
|
||||
|
||||
@@ -1130,6 +1130,10 @@ public class PurchaseOrderController {
|
||||
code_map.put("category_cd", commonService.bizMakeOptionList("0000167", CommonUtils.nullToEmpty((String)paramMap.get("category_cd")),"common.getCodeselect"));
|
||||
//제품구분
|
||||
code_map.put("product_cd", commonService.bizMakeOptionList("0000001", CommonUtils.nullToEmpty((String)paramMap.get("product_cd")),"common.getCodeselect"));
|
||||
//구매유형 (0001814)
|
||||
code_map.put("purchase_type", commonService.bizMakeOptionList("0001814", (String)paramMap.get("purchase_type"), "common.getCodeselect"));
|
||||
//발주자(구매담당자)
|
||||
code_map.put("writer", commonService.bizMakeOptionList("", (String)paramMap.get("writer"), "common.getUserselect"));
|
||||
|
||||
if("excel".equals(actionType)){
|
||||
list = commonService.selectList("purchaseOrder.purchaseOrderMasterList_new", request, paramMap);
|
||||
|
||||
@@ -878,6 +878,8 @@ public class QualityController {
|
||||
code_map.put("action_manager_id", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("search_action_manager")), "common.getUserselect"));
|
||||
// 조치자 목록
|
||||
code_map.put("action_user_id", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)paramMap.get("search_action_user")), "common.getUserselect"));
|
||||
// 설변유형
|
||||
code_map.put("change_type", commonService.bizMakeOptionList("0001054", CommonUtils.nullToEmpty((String)paramMap.get("search_change_type")), "common.getCodeselect"));
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -915,6 +917,8 @@ public class QualityController {
|
||||
code_map.put("requester_id", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)info.get("requester_id")), "common.getUserselect"));
|
||||
// 조치담당자 목록
|
||||
code_map.put("action_manager_id", commonService.bizMakeOptionList("", CommonUtils.nullToEmpty((String)info.get("action_manager_id")), "common.getUserselect"));
|
||||
// 설변유형
|
||||
code_map.put("change_type", commonService.bizMakeOptionList("0001054", CommonUtils.nullToEmpty((String)info.get("change_type")), "common.getCodeselect"));
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -2689,7 +2689,7 @@ INSERT INTO OEM_MNG
|
||||
VALUES
|
||||
(
|
||||
#{objid}::numeric,
|
||||
LPAD(nextval('seq_comm_code')::varchar,7,'0'),
|
||||
LPAD((COALESCE((SELECT MAX(CODE_ID::numeric) FROM COMM_CODE WHERE CODE_ID ~ '^[0-9]+$'), 0) + 1)::varchar, 7, '0'),
|
||||
#{parentCodeId},
|
||||
#{codeName},
|
||||
#{id},
|
||||
|
||||
@@ -3236,6 +3236,8 @@ SELECT POM.OBJID
|
||||
,POM.TOTAL_SUPPLY_UNIT_PRICE
|
||||
,POM.TOTAL_REAL_SUPPLY_PRICE
|
||||
,POM.NEGO_RATE
|
||||
,POM.WRITER
|
||||
,(SELECT USER_NAME FROM USER_INFO WHERE USER_ID = POM.WRITER) AS WRITER_NAME
|
||||
<!--
|
||||
,POM.TOTAL_SUPPLY_UNIT_PRICE::NUMERIC - POM.DISCOUNT_PRICE::NUMERIC as TOTAL_SUPPLY_UNIT_PRICE_NEGO
|
||||
-->
|
||||
@@ -3455,6 +3457,25 @@ WHERE 1=1
|
||||
AND TRIM(UPPER(POP.SPEC)) LIKE '%'||TRIM(UPPER(#{SEARCH_PART_SPEC}))||'%'
|
||||
)
|
||||
</if>
|
||||
<!-- 구매유형 필터 -->
|
||||
<if test="purchase_type != null and purchase_type != ''">
|
||||
AND SRM.PURCHASE_TYPE = #{purchase_type}
|
||||
</if>
|
||||
<!-- 발주자(구매담당자) 필터 -->
|
||||
<if test="writer != null and writer != ''">
|
||||
AND POM.WRITER = #{writer}
|
||||
</if>
|
||||
<!-- 메일발송 필터 -->
|
||||
<if test="mail_send_yn != null and mail_send_yn != ''">
|
||||
<choose>
|
||||
<when test='mail_send_yn == "Y"'>
|
||||
AND POM.MAIL_SEND_YN = 'Y'
|
||||
</when>
|
||||
<otherwise>
|
||||
AND (POM.MAIL_SEND_YN IS NULL OR POM.MAIL_SEND_YN = '' OR POM.MAIL_SEND_YN = 'N')
|
||||
</otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
|
||||
ORDER BY SPLIT_PART( PURCHASE_ORDER_NO, '-', 3)::NUMERIC DESC
|
||||
</select>
|
||||
@@ -4295,6 +4316,8 @@ SELECT POM.OBJID
|
||||
|
||||
,POM.SALES_MNG_USER_ID
|
||||
,(SELECT USER_NAME FROM USER_INFO WHERE USER_ID = POM.SALES_MNG_USER_ID) AS SALES_MNG_USER_NAME
|
||||
,POM.WRITER
|
||||
,(SELECT USER_NAME FROM USER_INFO WHERE USER_ID = POM.WRITER) AS WRITER_NAME
|
||||
,TO_CHAR(POM.REGDATE,'YYYY-MM-DD') AS REGDATE
|
||||
,POM.TOTAL_PRICE
|
||||
,POM.DISCOUNT_PRICE
|
||||
@@ -4435,12 +4458,19 @@ SELECT POM.OBJID
|
||||
<!-- <if test="sales_mng_user_id !=null and sales_mng_user_id != '' ">
|
||||
AND POM.SALES_MNG_USER_ID = #{sales_mng_user_id}
|
||||
</if> -->
|
||||
<if test="sales_mng_user_ids != null and sales_mng_user_ids != ''">
|
||||
<!-- <if test="sales_mng_user_ids != null and sales_mng_user_ids != ''">
|
||||
AND POM.SALES_MNG_USER_ID IN
|
||||
<foreach item="value" collection="sales_mng_user_ids.split(',')"
|
||||
open="(" separator="," close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if> -->
|
||||
<if test="sales_mng_user_ids != null and sales_mng_user_ids != ''">
|
||||
AND POM.WRITER IN
|
||||
<foreach item="value" collection="sales_mng_user_ids.split(',')"
|
||||
open="(" separator="," close=")">
|
||||
#{value}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="reg_start_date !=null and reg_start_date != '' ">
|
||||
AND TO_DATE(TO_CHAR(POM.REGDATE,'YYYY-MM-DD') ,'YYYY-MM-DD') <![CDATA[ >= ]]> TO_DATE(#{reg_start_date}, 'YYYY-MM-DD')
|
||||
|
||||
@@ -2174,6 +2174,8 @@
|
||||
, (SELECT COUNT(*) FROM ATTACH_FILE_INFO AFI WHERE AFI.TARGET_OBJID = ECR.OBJID AND AFI.DOC_TYPE = 'ECR_RESULT' AND STATUS = 'Active') AS ATTACH_FILE
|
||||
, (SELECT COUNT(*) FROM ATTACH_FILE_INFO AFI WHERE AFI.TARGET_OBJID = ECR.OBJID AND AFI.DOC_TYPE = 'ECR_DOC' AND STATUS = 'Active') AS ECR_DOC_FILE
|
||||
, CASE WHEN (ECR.ECR_DOC_SUMMARY IS NOT NULL AND ECR.ECR_DOC_SUMMARY != '') OR (ECR.ECR_DOC_REASON IS NOT NULL AND ECR.ECR_DOC_REASON != '') THEN 1 ELSE 0 END AS ECR_DOC_CNT
|
||||
, ECR.CHANGE_TYPE
|
||||
, CODE_NAME(ECR.CHANGE_TYPE) AS CHANGE_TYPE_NAME
|
||||
FROM PMS_QUALITY_ECR ECR
|
||||
WHERE 1=1
|
||||
<if test="search_request_date_from != null and search_request_date_from != ''">
|
||||
@@ -2221,6 +2223,9 @@
|
||||
<if test="search_complete_date_to != null and search_complete_date_to != ''">
|
||||
AND ECR.COMPLETE_DATE <![CDATA[<=]]> #{search_complete_date_to}
|
||||
</if>
|
||||
<if test="search_change_type != null and search_change_type != ''">
|
||||
AND ECR.CHANGE_TYPE = #{search_change_type}
|
||||
</if>
|
||||
ORDER BY ECR.REQUEST_DATE DESC, ECR.REG_DATE DESC
|
||||
</select>
|
||||
|
||||
@@ -2254,6 +2259,8 @@
|
||||
, ECR.ECR_REV_DATE
|
||||
, ECR.ECR_DOC_FORM_NO
|
||||
, ECR.ECR_DOC_AUTHOR
|
||||
, ECR.CHANGE_TYPE
|
||||
, (SELECT CODE_NAME FROM COMM_CODE WHERE CODE_ID = ECR.CHANGE_TYPE) AS CHANGE_TYPE_NAME
|
||||
FROM PMS_QUALITY_ECR ECR
|
||||
WHERE ECR.OBJID = #{OBJID}
|
||||
</select>
|
||||
@@ -2279,6 +2286,7 @@
|
||||
, DUE_DATE
|
||||
, ACTION_DEPT
|
||||
, ACTION_MANAGER_ID
|
||||
, CHANGE_TYPE
|
||||
, ATTACH_FILE_OBJID
|
||||
, REMARK
|
||||
, WRITER
|
||||
@@ -2295,6 +2303,7 @@
|
||||
, #{DUE_DATE}
|
||||
, #{ACTION_DEPT}
|
||||
, #{ACTION_MANAGER_ID}
|
||||
, #{CHANGE_TYPE}
|
||||
, #{ATTACH_FILE_OBJID}
|
||||
, #{REMARK}
|
||||
, #{WRITER}
|
||||
@@ -2314,6 +2323,7 @@
|
||||
, DUE_DATE = #{DUE_DATE}
|
||||
, ACTION_DEPT = #{ACTION_DEPT}
|
||||
, ACTION_MANAGER_ID = #{ACTION_MANAGER_ID}
|
||||
, CHANGE_TYPE = #{CHANGE_TYPE}
|
||||
, REMARK = #{REMARK}
|
||||
, MODIFIER = #{WRITER}
|
||||
, MOD_DATE = NOW()
|
||||
|
||||
@@ -1339,6 +1339,46 @@ VALUES
|
||||
AND SRM.REGDATE::DATE <![CDATA[ <= ]]> #{regdate_end}::DATE
|
||||
</if>
|
||||
|
||||
<!-- 공급업체 검색 -->
|
||||
<if test="customer_cd != null and !''.equals(customer_cd)">
|
||||
AND (
|
||||
-- 프로젝트에서 고객사 조회
|
||||
SRM.PROJECT_NO IN (
|
||||
SELECT PM.OBJID::VARCHAR
|
||||
FROM PROJECT_MGMT PM
|
||||
LEFT JOIN CONTRACT_MGMT CM ON CM.OBJID = PM.CONTRACT_OBJID
|
||||
WHERE CM.CUSTOMER_OBJID::VARCHAR = #{customer_cd}
|
||||
)
|
||||
-- 직접 저장된 고객사
|
||||
OR SRM.CUSTOMER_OBJID = #{customer_cd}
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 작성자 검색 -->
|
||||
<if test="request_user != null and !''.equals(request_user)">
|
||||
AND (SRM.REQUEST_USER_ID = #{request_user} OR SRM.WRITER = #{request_user})
|
||||
</if>
|
||||
|
||||
<!-- 제품구분 검색 -->
|
||||
<if test="part_type != null and !''.equals(part_type)">
|
||||
AND (
|
||||
-- 프로젝트에서 제품구분 조회
|
||||
SRM.PROJECT_NO IN (
|
||||
SELECT PM.OBJID::VARCHAR
|
||||
FROM PROJECT_MGMT PM
|
||||
LEFT JOIN CONTRACT_MGMT CM ON CM.OBJID = PM.CONTRACT_OBJID
|
||||
WHERE CM.PRODUCT = #{part_type}
|
||||
)
|
||||
-- 직접 저장된 제품구분
|
||||
OR SRM.PRODUCT_NAME = #{part_type}
|
||||
)
|
||||
</if>
|
||||
|
||||
<!-- 프로젝트번호 검색 (단일 선택) -->
|
||||
<if test="project_no != null and !''.equals(project_no)">
|
||||
AND SRM.PROJECT_NO = #{project_no}
|
||||
</if>
|
||||
|
||||
ORDER BY SRM.REGDATE desc
|
||||
</select>
|
||||
|
||||
@@ -4140,6 +4180,24 @@ ORDER BY V.PATH2
|
||||
AND SRM.REGDATE::DATE <![CDATA[ <= ]]> #{regdate_end}::DATE
|
||||
</if>
|
||||
|
||||
<!-- 구매유형 검색 (멀티선택) -->
|
||||
<if test="purchase_types != null and !''.equals(purchase_types)">
|
||||
AND SRM.PURCHASE_TYPE IN
|
||||
<foreach item="item" collection="purchase_types.split(',')" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<!-- 작성자 검색 -->
|
||||
<if test="writer != null and !''.equals(writer)">
|
||||
AND SRM.WRITER = #{writer}
|
||||
</if>
|
||||
|
||||
<!-- 제품구분 검색 -->
|
||||
<if test="part_type != null and !''.equals(part_type)">
|
||||
AND SRM.PRODUCT_NAME = #{part_type}
|
||||
</if>
|
||||
|
||||
ORDER BY SRM.REGDATE DESC
|
||||
</select>
|
||||
|
||||
|
||||
@@ -162,8 +162,8 @@ public class SalesMngController {
|
||||
|
||||
//list = salesMngService.getSalesRequestMasterList(request, paramMap);
|
||||
|
||||
//프로젝트번호 project_no
|
||||
code_map.put("contract_objid",commonService.bizMakeOptionList("", (String)paramMap.get("contract_objid"),"common.getProjectNameList"));
|
||||
// 프로젝트번호
|
||||
code_map.put("project_no", commonService.bizMakeOptionList("", (String)paramMap.get("project_no"), "common.getProjectNameList"));
|
||||
//상태
|
||||
code_map.put("act_status",commonService.bizMakeOptionList("0001062", (String)paramMap.get("act_status"),"common.getCodeselect"));
|
||||
//접수자
|
||||
@@ -172,6 +172,13 @@ public class SalesMngController {
|
||||
code_map.put("request_cd",commonService.bizMakeOptionList("0000167", (String)paramMap.get("request_cd"),"common.getCodeselect"));
|
||||
|
||||
code_map.put("product_code",commonService.bizMakeOptionList("", (String)paramMap.get("product_code"),"common.getProductCodeselect"));
|
||||
|
||||
// 공급업체 (고객사: SUPPLY_MNG + CLIENT_MNG)
|
||||
code_map.put("customer_cd", commonService.bizMakeOptionList("", (String)paramMap.get("customer_cd"), "common.getAllSupplySelect"));
|
||||
// 작성자
|
||||
code_map.put("request_user", commonService.bizMakeOptionList("", (String)paramMap.get("request_user"),"common.getUserselect"));
|
||||
// 제품구분 (0000001)
|
||||
code_map.put("part_type", commonService.bizMakeOptionList("0000001", (String)paramMap.get("part_type"), "common.getCodeselect"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -1310,12 +1317,14 @@ public class SalesMngController {
|
||||
Map code_map = new HashMap();
|
||||
|
||||
try {
|
||||
// 구매유형
|
||||
code_map.put("purchase_type", commonService.bizMakeOptionList("0001821", (String)paramMap.get("purchase_type"), "common.getCodeselect"));
|
||||
// 구매유형 (0001814)
|
||||
code_map.put("purchase_type", commonService.bizMakeOptionList("0001814", (String)paramMap.get("purchase_type"), "common.getCodeselect"));
|
||||
// 주문유형
|
||||
code_map.put("order_type", commonService.bizMakeOptionList("0001822", (String)paramMap.get("order_type"), "common.getCodeselect"));
|
||||
// 제품구분
|
||||
code_map.put("product_name", commonService.bizMakeOptionList("0000016", (String)paramMap.get("product_name"), "common.getCodeselect"));
|
||||
// 제품구분 (0000001)
|
||||
code_map.put("part_type", commonService.bizMakeOptionList("0000001", (String)paramMap.get("part_type"), "common.getCodeselect"));
|
||||
// 작성자
|
||||
code_map.put("writer", commonService.bizMakeOptionList("", (String)paramMap.get("writer"), "common.getUserselect"));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
package com.pms.salesmgmt.controller;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -188,6 +189,8 @@ public class SalesNcollectMgmtController {
|
||||
codeMap.put("shippingStatusList", shippingStatusOptions.toString());
|
||||
// 담당자
|
||||
codeMap.put("managerList", commonService.bizMakeOptionList("", "", "common.getUserselect"));
|
||||
// 판매상태 - 0900207
|
||||
codeMap.put("salesStatusList", commonService.bizMakeOptionList("0900207", "", "common.getCodeselect"));
|
||||
|
||||
request.setAttribute("codeMap", codeMap);
|
||||
} catch (Exception e) {
|
||||
@@ -447,6 +450,28 @@ public class SalesNcollectMgmtController {
|
||||
System.out.println("poNo: [" + paramMap.get("poNo") + "]");
|
||||
System.out.println("serialNo: [" + paramMap.get("serialNo") + "]");
|
||||
|
||||
// 판매상태 멀티 선택 처리 (배열 → 리스트 변환)
|
||||
String[] salesStatusArr = request.getParameterValues("salesStatus");
|
||||
System.out.println("=== 판매상태 파라미터 디버깅 ===");
|
||||
System.out.println("salesStatusArr: " + (salesStatusArr != null ? java.util.Arrays.toString(salesStatusArr) : "null"));
|
||||
if(salesStatusArr != null && salesStatusArr.length > 0) {
|
||||
List<String> salesStatusList = new ArrayList<String>();
|
||||
for(String status : salesStatusArr) {
|
||||
System.out.println(" status 값: [" + status + "]");
|
||||
if(status != null && !status.isEmpty()) {
|
||||
salesStatusList.add(status);
|
||||
}
|
||||
}
|
||||
System.out.println("salesStatusList: " + salesStatusList);
|
||||
if(!salesStatusList.isEmpty()) {
|
||||
paramMap.put("salesStatus", salesStatusList);
|
||||
} else {
|
||||
paramMap.remove("salesStatus");
|
||||
}
|
||||
} else {
|
||||
paramMap.remove("salesStatus");
|
||||
}
|
||||
|
||||
// 품명/품번 파라미터가 비어있으면 경고
|
||||
if((paramMap.get("search_partNo") == null || paramMap.get("search_partNo").toString().isEmpty()) &&
|
||||
(paramMap.get("search_partName") == null || paramMap.get("search_partName").toString().isEmpty())) {
|
||||
|
||||
@@ -926,7 +926,17 @@
|
||||
(SELECT USER_NAME FROM USER_INFO WHERE USER_ID = T.PM_USER_ID)
|
||||
) AS MANAGER,
|
||||
COALESCE(SR.incoterms, '') AS INCOTERMS,
|
||||
T.SALES_STATUS,
|
||||
-- 판매상태: 수주수량과 판매수량 비교하여 동적 계산
|
||||
CASE
|
||||
WHEN COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) = 0
|
||||
THEN '미판매'
|
||||
WHEN COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) >= COALESCE(T.QUANTITY::numeric, 0)
|
||||
THEN '완판'
|
||||
WHEN COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) > 0
|
||||
AND COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) <![CDATA[<]]> COALESCE(T.QUANTITY::numeric, 0)
|
||||
THEN '분할판매'
|
||||
ELSE ''
|
||||
END AS SALES_STATUS,
|
||||
T.OBJID::VARCHAR AS SALE_NO,
|
||||
'ORIGINAL' AS RECORD_TYPE,
|
||||
'' AS SPLIT_LOG_ID,
|
||||
@@ -1069,15 +1079,27 @@
|
||||
AND SR.project_no IS NOT NULL
|
||||
AND SR.incoterms = #{incoterms}
|
||||
</if>
|
||||
<if test="salesStatus != null and salesStatus != ''">
|
||||
<choose>
|
||||
<when test="salesStatus == 'NOT_CLOSED'">
|
||||
AND (T.SALES_STATUS IS NULL OR T.SALES_STATUS = '' OR T.SALES_STATUS != '완료')
|
||||
</when>
|
||||
<otherwise>
|
||||
AND T.SALES_STATUS = #{salesStatus}
|
||||
</otherwise>
|
||||
</choose>
|
||||
<!-- 판매상태 검색 (멀티 선택 지원) - 동적 계산 기준 -->
|
||||
<if test="salesStatus != null and salesStatus.size() > 0">
|
||||
AND (
|
||||
1=0
|
||||
<foreach item="item" collection="salesStatus">
|
||||
<!-- 완판: 0900208 -->
|
||||
<if test="'0900208'.equals(item)">
|
||||
OR (COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) >= COALESCE(T.QUANTITY::numeric, 0)
|
||||
AND COALESCE(T.QUANTITY::numeric, 0) > 0)
|
||||
</if>
|
||||
<!-- 분할판매: 0900209 -->
|
||||
<if test="'0900209'.equals(item)">
|
||||
OR (COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) > 0
|
||||
AND COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) <![CDATA[<]]> COALESCE(T.QUANTITY::numeric, 0))
|
||||
</if>
|
||||
<!-- 미판매: 0900210 -->
|
||||
<if test="'0900210'.equals(item)">
|
||||
OR COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) = 0
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 매출마감 기간 검색 -->
|
||||
<if test="salesDeadlineFrom != null and salesDeadlineFrom != ''">
|
||||
@@ -1248,15 +1270,27 @@ ORDER BY T.REGDATE DESC, T.PROJECT_NO DESC
|
||||
AND SR.incoterms = #{incoterms}
|
||||
)
|
||||
</if>
|
||||
<if test="salesStatus != null and salesStatus != ''">
|
||||
<choose>
|
||||
<when test="salesStatus == 'NOT_CLOSED'">
|
||||
AND (T.SALES_STATUS IS NULL OR T.SALES_STATUS = '' OR T.SALES_STATUS != '완료')
|
||||
</when>
|
||||
<otherwise>
|
||||
AND T.SALES_STATUS = #{salesStatus}
|
||||
</otherwise>
|
||||
</choose>
|
||||
<!-- 판매상태 검색 (멀티 선택 지원) - 동적 계산 기준 -->
|
||||
<if test="salesStatus != null and salesStatus.size() > 0">
|
||||
AND (
|
||||
1=0
|
||||
<foreach item="item" collection="salesStatus">
|
||||
<!-- 완판: 0900208 -->
|
||||
<if test="'0900208'.equals(item)">
|
||||
OR (COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) >= COALESCE(T.QUANTITY::numeric, 0)
|
||||
AND COALESCE(T.QUANTITY::numeric, 0) > 0)
|
||||
</if>
|
||||
<!-- 분할판매: 0900209 -->
|
||||
<if test="'0900209'.equals(item)">
|
||||
OR (COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) > 0
|
||||
AND COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) <![CDATA[<]]> COALESCE(T.QUANTITY::numeric, 0))
|
||||
</if>
|
||||
<!-- 미판매: 0900210 -->
|
||||
<if test="'0900210'.equals(item)">
|
||||
OR COALESCE((SELECT SUM(sales_quantity) FROM sales_registration WHERE project_no LIKE T.PROJECT_NO || '%'), 0) = 0
|
||||
</if>
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<!-- 매출마감 기간 검색 -->
|
||||
<if test="salesDeadlineFrom != null and salesDeadlineFrom != ''">
|
||||
|
||||
Reference in New Issue
Block a user