272 lines
11 KiB
Plaintext
272 lines
11 KiB
Plaintext
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||
|
|
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||
|
|
<%@ page import="com.pms.common.utils.*"%>
|
||
|
|
<%@ page import="java.util.*" %>
|
||
|
|
<%@include file= "/init.jsp" %>
|
||
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
||
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
||
|
|
<%
|
||
|
|
String menuObjId = request.getParameter("menuObjId");
|
||
|
|
String menuName = CommonUtils.getMenuName(menuObjId, "고객 CS 관리");
|
||
|
|
%>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
||
|
|
</head>
|
||
|
|
|
||
|
|
<style>
|
||
|
|
/* 상태 스타일 */
|
||
|
|
.status-receipt { color: #007bff; font-weight: bold; }
|
||
|
|
.status-progress { color: #ffc107; font-weight: bold; }
|
||
|
|
.status-complete { color: #28a745; font-weight: bold; }
|
||
|
|
|
||
|
|
/* 검색필터 아이템 스타일 */
|
||
|
|
.search-item { display: flex; align-items: center; gap: 5px; }
|
||
|
|
.search-item label { font-weight: bold; white-space: nowrap; min-width: 60px; }
|
||
|
|
.search-item input, .search-item select { height: 28px; }
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<script type="text/javascript">
|
||
|
|
$(document).ready(function(){
|
||
|
|
fnc_changePaginationAndTotalCountArea();
|
||
|
|
$('.select2').select2();
|
||
|
|
fnc_datepick();
|
||
|
|
|
||
|
|
$("input").keyup(function(e){
|
||
|
|
if(e.keyCode == 13){
|
||
|
|
$("#page").val("1");
|
||
|
|
fn_search();
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
// 조회
|
||
|
|
$("#btnSearch").click(function(){
|
||
|
|
$("#page").val("1");
|
||
|
|
fn_search();
|
||
|
|
});
|
||
|
|
|
||
|
|
// 고객 불량 등록
|
||
|
|
$("#btnRegistDefect").click(function(){
|
||
|
|
fn_registDefectPopUp();
|
||
|
|
});
|
||
|
|
|
||
|
|
// 조치결과 등록
|
||
|
|
$("#btnRegistAction").click(function(){
|
||
|
|
fn_registActionPopUp();
|
||
|
|
});
|
||
|
|
|
||
|
|
fn_search();
|
||
|
|
});
|
||
|
|
|
||
|
|
// 컬럼: 접수번호, 접수일, 수량, 고객사, 모델명, 제품명, 품번, 생산일, 판매일, S/N, 제조사, 불만내용, 조치내용, 귀책판정, 상태, 비고, 조치일, 조치자, 첨부파일
|
||
|
|
var columns = [
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:110, widthGrow:1, title:'접수번호', field:'RECEIPT_NO'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'접수일', field:'RECEIPT_DATE'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'right', minWidth:70, widthGrow:1, title:'수량', field:'QTY',
|
||
|
|
formatter:"money", formatterParams:{thousand:",", precision:false}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1, title:'고객사', field:'CUSTOMER_NAME'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1, title:'모델명', field:'MODEL_NAME'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1, title:'제품명', field:'PRODUCT_NAME'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1, title:'품번', field:'PART_NO'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:90, widthGrow:1, title:'생산일', field:'PRODUCTION_DATE'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:90, widthGrow:1, title:'판매일', field:'SALES_DATE'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:100, widthGrow:1, title:'S/N', field:'SERIAL_NO'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:80, widthGrow:1, title:'제조사', field:'MANUFACTURER'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:120, widthGrow:2, title:'불만내용', field:'COMPLAINT_CONTENT'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:120, widthGrow:2, title:'조치내용', field:'ACTION_CONTENT'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'귀책판정', field:'BLAME_DECISION'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:70, widthGrow:1, title:'상태', field:'STATUS',
|
||
|
|
formatter: function(cell, formatterParams, onRendered){
|
||
|
|
var val = fnc_checkNull(cell.getValue());
|
||
|
|
if(val === '접수') return '<span class="status-receipt">접수</span>';
|
||
|
|
if(val === '처리중') return '<span class="status-progress">처리중</span>';
|
||
|
|
if(val === '완료') return '<span class="status-complete">완료</span>';
|
||
|
|
return val;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', minWidth:100, widthGrow:1, title:'비고', field:'REMARK'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:90, widthGrow:1, title:'조치일', field:'ACTION_DATE'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:80, widthGrow:1, title:'조치자', field:'ACTION_USER_NAME'},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', minWidth:70, widthGrow:1, title:'첨부파일', field:'ATTACH_FILE',
|
||
|
|
formatter: function(cell, formatterParams, onRendered){
|
||
|
|
var fileYn = fnc_checkNull(cell.getValue());
|
||
|
|
if(fileYn === 'Y'){
|
||
|
|
return '<a href="#" class="file_icon" style="display:inline-block; width:20px; height:20px;"></a>';
|
||
|
|
}
|
||
|
|
return '<a href="#" class="file_empty_icon" style="display:inline-block; width:20px; height:20px;"></a>';
|
||
|
|
},
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
fn_openAttachFilePopUp(objId);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
];
|
||
|
|
|
||
|
|
// 조회
|
||
|
|
function fn_search(){
|
||
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/quality/customerCsGridList.do", columns, true);
|
||
|
|
}
|
||
|
|
|
||
|
|
// 검색조건 초기화
|
||
|
|
function fn_reset(){
|
||
|
|
$("#search_receipt_date_from").val("");
|
||
|
|
$("#search_receipt_date_to").val("");
|
||
|
|
$("#search_customer_name").val("");
|
||
|
|
$("#search_model_name").val("");
|
||
|
|
$("#search_product_name").val("");
|
||
|
|
$("#search_part_no").val("");
|
||
|
|
$("#search_serial_no").val("");
|
||
|
|
$("#search_manufacturer").val("");
|
||
|
|
$("#search_blame_decision").val("");
|
||
|
|
$("#search_status").val("");
|
||
|
|
$("#search_action_date_from").val("");
|
||
|
|
$("#search_action_date_to").val("");
|
||
|
|
$("#search_action_user").val("");
|
||
|
|
}
|
||
|
|
|
||
|
|
// 고객 불량 등록 팝업
|
||
|
|
function fn_registDefectPopUp(){
|
||
|
|
var popup_width = 1200;
|
||
|
|
var popup_height = 800;
|
||
|
|
var hiddenForm = document.hiddenForm;
|
||
|
|
var target = "customerCsDefectPopUp";
|
||
|
|
var url = "/quality/customerCsDefectFormPopUp.do";
|
||
|
|
|
||
|
|
fn_centerPopup(popup_width, popup_height, "", target);
|
||
|
|
|
||
|
|
hiddenForm.action = url;
|
||
|
|
hiddenForm.actionType.value = 'new';
|
||
|
|
hiddenForm.target = target;
|
||
|
|
hiddenForm.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
// 조치결과 등록 팝업
|
||
|
|
function fn_registActionPopUp(){
|
||
|
|
var selected = _tabulGrid.getSelectedData();
|
||
|
|
if(selected.length == 0){
|
||
|
|
Swal.fire("선택된 데이터가 없습니다.");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
if(selected.length > 1){
|
||
|
|
Swal.fire("한건씩 등록 가능합니다.");
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
var popup_width = 1200;
|
||
|
|
var popup_height = 800;
|
||
|
|
var hiddenForm = document.hiddenForm;
|
||
|
|
var target = "customerCsActionPopUp";
|
||
|
|
var url = "/quality/customerCsActionFormPopUp.do";
|
||
|
|
|
||
|
|
fn_centerPopup(popup_width, popup_height, "", target);
|
||
|
|
|
||
|
|
hiddenForm.action = url;
|
||
|
|
hiddenForm.OBJID.value = selected[0].OBJID;
|
||
|
|
hiddenForm.actionType.value = 'action';
|
||
|
|
hiddenForm.target = target;
|
||
|
|
hiddenForm.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
// 첨부파일 팝업
|
||
|
|
function fn_openAttachFilePopUp(objId){
|
||
|
|
var popup_width = 800;
|
||
|
|
var popup_height = 600;
|
||
|
|
var url = "/common/filePopUp.do?OBJID=" + objId + "&FILE_TYPE=ATTACH";
|
||
|
|
window.open(url, "attachFilePopUp", "width="+popup_width+",height="+popup_height+",scrollbars=yes,resizable=yes");
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
|
||
|
|
<body>
|
||
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
||
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
||
|
|
<input type="hidden" name="actionType" id="actionType">
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<form name="form1" id="form1" action="" method="post">
|
||
|
|
<div class="content-box" style="height: 99.3%;">
|
||
|
|
<div class="content-box-s">
|
||
|
|
<div class="plm_menu_name_gdnsi">
|
||
|
|
<h2>
|
||
|
|
<span><%=menuName%></span>
|
||
|
|
</h2>
|
||
|
|
<div class="btnArea">
|
||
|
|
<input type="button" class="plm_btns" value="고객 불량 등록" id="btnRegistDefect">
|
||
|
|
<input type="button" class="plm_btns" value="조치결과 등록" id="btnRegistAction">
|
||
|
|
<input type="button" class="plm_btns" value="조회" id="btnSearch">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div id="plmSearchZon">
|
||
|
|
<div style="display:flex; flex-wrap:wrap; gap:10px; align-items:center;">
|
||
|
|
<div class="search-item">
|
||
|
|
<label>접수일</label>
|
||
|
|
<input type="text" name="search_receipt_date_from" id="search_receipt_date_from" class="date_icon" style="width:100px;" autocomplete="off">
|
||
|
|
<span>~</span>
|
||
|
|
<input type="text" name="search_receipt_date_to" id="search_receipt_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>고객사</label>
|
||
|
|
<input type="text" name="search_customer_name" id="search_customer_name" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>모델명</label>
|
||
|
|
<input type="text" name="search_model_name" id="search_model_name" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>제품명</label>
|
||
|
|
<input type="text" name="search_product_name" id="search_product_name" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>품번</label>
|
||
|
|
<input type="text" name="search_part_no" id="search_part_no" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>S/N</label>
|
||
|
|
<input type="text" name="search_serial_no" id="search_serial_no" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>제조사</label>
|
||
|
|
<input type="text" name="search_manufacturer" id="search_manufacturer" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>귀책판정</label>
|
||
|
|
<select name="search_blame_decision" id="search_blame_decision" style="width:90px;">
|
||
|
|
<option value="">전체</option>
|
||
|
|
<option value="자사">자사</option>
|
||
|
|
<option value="고객">고객</option>
|
||
|
|
<option value="협력사">협력사</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>상태</label>
|
||
|
|
<select name="search_status" id="search_status" style="width:90px;">
|
||
|
|
<option value="">전체</option>
|
||
|
|
<option value="접수">접수</option>
|
||
|
|
<option value="처리중">처리중</option>
|
||
|
|
<option value="완료">완료</option>
|
||
|
|
</select>
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>조치일</label>
|
||
|
|
<input type="text" name="search_action_date_from" id="search_action_date_from" class="date_icon" style="width:100px;" autocomplete="off">
|
||
|
|
<span>~</span>
|
||
|
|
<input type="text" name="search_action_date_to" id="search_action_date_to" class="date_icon" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
<div class="search-item">
|
||
|
|
<label>조치자</label>
|
||
|
|
<input type="text" name="search_action_user" id="search_action_user" style="width:100px;" autocomplete="off">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</body>
|
||
|
|
</html>
|