450 lines
13 KiB
Plaintext
450 lines
13 KiB
Plaintext
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||
|
|
pageEncoding="UTF-8"%>
|
||
|
|
<%@ page import="com.pms.common.utils.*"%>
|
||
|
|
<%@include file="/init.jsp"%>
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html lang="ko">
|
||
|
|
<head>
|
||
|
|
<meta charset="utf-8">
|
||
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
||
|
|
|
||
|
|
<c:set var="search_oem" value="${empty param.search_oem ? '' : param.search_oem}" />
|
||
|
|
<c:set var="search_car" value="${empty param.search_car ? '' : param.search_car}" />
|
||
|
|
|
||
|
|
<script>
|
||
|
|
|
||
|
|
$(function(){
|
||
|
|
$(document).ready(function(){
|
||
|
|
fnc_datepick();
|
||
|
|
|
||
|
|
getCarList("${search_oem}","${search_car}");
|
||
|
|
getChangeProductList("search_product","${param.search_productFamily}","${param.search_product}");
|
||
|
|
|
||
|
|
$("input[type=text]").keyup(function(e){
|
||
|
|
if(e.keyCode == 13) search();
|
||
|
|
});
|
||
|
|
//자료등록 팝업
|
||
|
|
$(".documentEnrollBtn").click(function(){
|
||
|
|
window.open("/part/designDocumentFormPopup.do", "", "width=725, height=340");
|
||
|
|
});
|
||
|
|
//image src encoding
|
||
|
|
$("img").each(function(i){
|
||
|
|
var imgSrc = $(this).attr("data-SRC");
|
||
|
|
$(this).attr("src", encodeURI(imgSrc));
|
||
|
|
});
|
||
|
|
$("input[name=partCheckBox]").click(function(){
|
||
|
|
var partChk = $("input[name=partCheckBox]");
|
||
|
|
if(partChk.not(":checked")) {
|
||
|
|
$("#allCheck").attr('checked',false);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
});
|
||
|
|
function search(){
|
||
|
|
var form = document.form1;
|
||
|
|
form.action = "/part/tempPartList.do";
|
||
|
|
form.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
function excelExport(){
|
||
|
|
var form = document.form1;
|
||
|
|
form.actionType.value = "excel";
|
||
|
|
search();
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
//파트 상세 또는 입력 화면을 출력한다.
|
||
|
|
function openPartFormPopup(actionType,objid,writer){
|
||
|
|
var hiddenForm = document.hiddenForm;
|
||
|
|
var url = "/part/partFormPopup.do";
|
||
|
|
var target = "tempPartListPopup";
|
||
|
|
if("" != objid){
|
||
|
|
url = "/part/partDetailViewPopup.do";
|
||
|
|
target = objid;
|
||
|
|
}
|
||
|
|
|
||
|
|
if("${userId}" == writer){
|
||
|
|
url = "/part/partFormPopup.do";
|
||
|
|
}
|
||
|
|
|
||
|
|
window.open(url,target,"width=640, height=320");
|
||
|
|
|
||
|
|
hiddenForm.action = url;
|
||
|
|
hiddenForm.actionType.value = actionType;
|
||
|
|
hiddenForm.objid.value = objid;
|
||
|
|
hiddenForm.target = target;
|
||
|
|
hiddenForm.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
//선택된 파트의 상태를 변경한다.
|
||
|
|
function changePartStatus(){
|
||
|
|
var form = document.form1;
|
||
|
|
|
||
|
|
var partLength = $("input[name=partCheckBox]:checked").length;
|
||
|
|
|
||
|
|
if(0 < partLength){
|
||
|
|
|
||
|
|
var validateFlag = true;
|
||
|
|
|
||
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
||
|
|
var rev = fnc_checkNull($(this).attr("data-REV").replace(" ",""));
|
||
|
|
if(rev == ""){
|
||
|
|
validateFlag = false;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
if(!validateFlag){
|
||
|
|
Swal.fire("Rev가 입력되지 않은 Part는 확정할 수 없습니다.");
|
||
|
|
}else{
|
||
|
|
if(confirm("해당파트를 확정하시겠습니까?")){
|
||
|
|
form.status.value="complete";
|
||
|
|
var param = $("#form1").serialize();
|
||
|
|
$.ajax({
|
||
|
|
type : "POST",
|
||
|
|
url : "/part/changeMultiPartStatus.do",
|
||
|
|
data: param,
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
||
|
|
Swal.fire(jqxhr.status);
|
||
|
|
Swal.fire(jqxhr.responseText);
|
||
|
|
},
|
||
|
|
success: function(result){
|
||
|
|
if(null != result){
|
||
|
|
Swal.fire(result.message);
|
||
|
|
search();
|
||
|
|
self.close();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
Swal.fire("선택된 파트가 없습니다.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//Excel Upload
|
||
|
|
function openPartExcelImportPopUp(){
|
||
|
|
window.open("/part/openPartExcelImportPopUp.do","excelImportPopUp","width=1300, height=800");
|
||
|
|
}
|
||
|
|
|
||
|
|
//전체 체크
|
||
|
|
function fn_allChk(obj){
|
||
|
|
var checked = $(obj).is(":checked");
|
||
|
|
|
||
|
|
$("input[name=partCheckBox]").each(function(){
|
||
|
|
if(checked) this.checked = true;
|
||
|
|
else this.checked = false;
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
//작성중에 해당하는 파트를 삭제한다.
|
||
|
|
function deletePart(){
|
||
|
|
var partLength = $("input[name=partCheckBox]:checked").length;
|
||
|
|
|
||
|
|
if(0 < partLength){
|
||
|
|
var checkCnt = 0;
|
||
|
|
$("input[name=partCheckBox]:checked").each(function(){
|
||
|
|
var partObjId = this.value;
|
||
|
|
var status = $("input[name="+partObjId+"_status]").val();
|
||
|
|
if(status != "create"){
|
||
|
|
checkCnt++;
|
||
|
|
Swal.fire("작성중인 Part만 삭제 가능합니다.");
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
if(checkCnt == 0){
|
||
|
|
|
||
|
|
var param = $("#form1").serialize();
|
||
|
|
|
||
|
|
if(confirm("선택된 파트를 삭제하시겠습니까?")){
|
||
|
|
$.ajax({
|
||
|
|
type : "POST",
|
||
|
|
url : "/part/deletePart.do",
|
||
|
|
data: param,
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
||
|
|
Swal.fire(jqxhr.status);
|
||
|
|
Swal.fire(jqxhr.responseText);
|
||
|
|
},
|
||
|
|
success: function(result){
|
||
|
|
if(null != result){
|
||
|
|
Swal.fire(result.message);
|
||
|
|
search();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
Swal.fire("선택된 파트가 없습니다.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function openImagePopUp(url){
|
||
|
|
var img=new Image();
|
||
|
|
img.src=url;
|
||
|
|
var img_width=img.width;
|
||
|
|
var img_height=img.height;
|
||
|
|
var win_width=img.width+25;
|
||
|
|
var height=img.height+30;
|
||
|
|
|
||
|
|
window.open(url,"partListShapeImgPopUp","width="+img_width+",height="+height+", menubars=no, scrollbars=yes, resizable=yes'");
|
||
|
|
}
|
||
|
|
|
||
|
|
function getCarList(oemObjid,carObjid){
|
||
|
|
var carSelectObj = $("#search_car");
|
||
|
|
$(carSelectObj).find("option").remove();
|
||
|
|
$(carSelectObj).append("<option value=''>선택</option>");
|
||
|
|
|
||
|
|
if("" == oemObjid || null == oemObjid){
|
||
|
|
return false;
|
||
|
|
}else{
|
||
|
|
$.ajax({
|
||
|
|
type : "POST",
|
||
|
|
url : "/admin/getOEMsCarList.do",
|
||
|
|
data:{ "status" : "active" , "oemObjId" : oemObjid},
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
||
|
|
Swal.fire(jqxhr.status);
|
||
|
|
Swal.fire(jqxhr.responseText);
|
||
|
|
},
|
||
|
|
success: function(result){
|
||
|
|
if(null != result){
|
||
|
|
for(var i=0;i<result.length;i++){
|
||
|
|
var objid = result[i].OBJID;
|
||
|
|
var carName = result[i].CAR_NAME;
|
||
|
|
var carCode = result[i].CAR_CODE;
|
||
|
|
$(carSelectObj).append("<option value='"+objid+"'>"+carCode+"</option>");
|
||
|
|
}
|
||
|
|
if("" != carObjid){
|
||
|
|
$(carSelectObj).val(carObjid);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function getChangeProductList(areaObjId,productGroupObjId,targetProductObjId){
|
||
|
|
$("#"+areaObjId).find("option").remove();
|
||
|
|
$("#"+areaObjId).append("<option value=''>선택</option>");
|
||
|
|
|
||
|
|
if("" != productGroupObjId && null != productGroupObjId){
|
||
|
|
$.ajax({
|
||
|
|
type : "POST",
|
||
|
|
url : "/common/getProductList_combo.do",
|
||
|
|
data:{"search_productGroupObjId" : productGroupObjId, "isJson":true},
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
||
|
|
Swal.fire(jqxhr.status);
|
||
|
|
Swal.fire(jqxhr.responseText);
|
||
|
|
},
|
||
|
|
success: function(result){
|
||
|
|
if(null != result){
|
||
|
|
for(var i=0;i<result.length;i++){
|
||
|
|
var resultAppendText = "";
|
||
|
|
var productName = result[i].PRODUCT_NAME;
|
||
|
|
var selectedFlag = "";
|
||
|
|
if(targetProductObjId == result[i].OBJID){
|
||
|
|
selectedFlag = "selected";
|
||
|
|
}
|
||
|
|
resultAppendText="<option value='"+result[i].OBJID+"' "+selectedFlag+">"+productName+"</option>";
|
||
|
|
$("#"+areaObjId).append(resultAppendText);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
//선택된 Part의 정보를 통해
|
||
|
|
function fn_drawingConversion(){
|
||
|
|
var form = document.form1;
|
||
|
|
var partLength = $("input[name=partCheckBox]:checked").length;
|
||
|
|
|
||
|
|
if(0 < partLength){
|
||
|
|
|
||
|
|
if(confirm("Part에 첨부된 도면의 용량에 따라 시간이 오래 걸릴 수 있습니다.\n선택된 Part의 도면을 변환 하시겠습니까?")){
|
||
|
|
form.actionType.value="drawingConversion";
|
||
|
|
var param = $("#form1").serialize();
|
||
|
|
$.ajax({
|
||
|
|
type : "POST",
|
||
|
|
url : "/common/conversionDrawing.do",
|
||
|
|
data: param,
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
||
|
|
Swal.fire(jqxhr.status);
|
||
|
|
Swal.fire(jqxhr.responseText);
|
||
|
|
},
|
||
|
|
success: function(result){
|
||
|
|
if(null != result){
|
||
|
|
Swal.fire(result.message);
|
||
|
|
search();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}else{
|
||
|
|
Swal.fire("선택된 파트가 없습니다.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</head>
|
||
|
|
<body class="backcolor">
|
||
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
||
|
|
<input type="hidden" name="actionType" id="actionType">
|
||
|
|
<input type="hidden" name="objid" id="objid">
|
||
|
|
</form>
|
||
|
|
<form name="form1" id="form1" method="post">
|
||
|
|
<input type="hidden" name="actionType" id="actionType">
|
||
|
|
<input type="hidden" name="status" id="status">
|
||
|
|
<section class="min_part_enroll" style="min-width:1640px;">
|
||
|
|
<div class="plm_menu_name">
|
||
|
|
<h2>
|
||
|
|
<span>자료(ERP Import file)관리</span>
|
||
|
|
</h2>
|
||
|
|
</div>
|
||
|
|
<div id="plmSearchZon">
|
||
|
|
<table>
|
||
|
|
<tbody>
|
||
|
|
<tr>
|
||
|
|
<td class="align_r">
|
||
|
|
<label for="" class="">연도</label>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<select name="" id="">
|
||
|
|
<option></option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td class="align_r">
|
||
|
|
<label for="" class="">고객사</label>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<select name="" id="">
|
||
|
|
<option></option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td class="align_r">
|
||
|
|
<label for="" class="">Project</label>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<select name="" id="" style="width:300px;">
|
||
|
|
<option>선택</option>
|
||
|
|
<option></option>
|
||
|
|
<option></option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td class="align_r">
|
||
|
|
<label for="" class="">등록자</label>
|
||
|
|
</td>
|
||
|
|
<td>
|
||
|
|
<select name="" id="">
|
||
|
|
<option>팀명선택</option>
|
||
|
|
</select>
|
||
|
|
<select name="" id="">
|
||
|
|
<option>팀원선택</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td><label for="">등록일</label></td>
|
||
|
|
<td colspan="">
|
||
|
|
<input type="text" id="search_fromDate" name="search_fromDate" class="date_icon" value="${param.search_fromDate}" style="width:85px !important;">
|
||
|
|
~ <input type="text" id="search_toDate" name="search_toDate" class="date_icon" value="${param.search_toDate}" style="width:85px !important;">
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
<div class="contents_page_basic_margin">
|
||
|
|
<div class="btn_wrap">
|
||
|
|
<div class="plm_btn_wrap">
|
||
|
|
<input type="button" value="자료조회" class="plm_btns" onclick="search();">
|
||
|
|
<input type="button" value="자료등록" class="plm_btns documentEnrollBtn">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div class="plm_table_wrap">
|
||
|
|
<table class="plm_table" style="text-align:center; border-bottom:0;">
|
||
|
|
<colgroup>
|
||
|
|
<col width="2%" />
|
||
|
|
<col width="3%" />
|
||
|
|
<col width="10%" />
|
||
|
|
<col width="15%" />
|
||
|
|
<col width="4%" />
|
||
|
|
<col width="4%"/>
|
||
|
|
<col width="3%"/>
|
||
|
|
<col width="6%"/>
|
||
|
|
<col width="5%"/>
|
||
|
|
<col width="7%"/>
|
||
|
|
<col width="*" />
|
||
|
|
</colgroup>
|
||
|
|
<tr class="plm_thead">
|
||
|
|
<td><input type="checkbox" name="" value="" id="allCheck" class="checkBox" onclick="fn_allChk(this);"></td>
|
||
|
|
<td>No</td>
|
||
|
|
<td>거래처</td>
|
||
|
|
<td>프로젝트 명</td>
|
||
|
|
<td>등록구분</td>
|
||
|
|
<td>출도구분</td>
|
||
|
|
<td colspan="2">유형</td>
|
||
|
|
<td>등록일</td>
|
||
|
|
<td>등록자</td>
|
||
|
|
<td>파일명</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td><input type="checkbox"></td>
|
||
|
|
<td>100</td>
|
||
|
|
<td>동아대학교</td>
|
||
|
|
<td>스마트팩토리 2차</td>
|
||
|
|
<td>전장</td>
|
||
|
|
<td>변경</td>
|
||
|
|
<td>이슈</td>
|
||
|
|
<td>2018-061</td>
|
||
|
|
<td>2018-12-11</td>
|
||
|
|
<td>기구설계팀 조항만</td>
|
||
|
|
<td><a href="#" class="documentEnrollBtn">동아대_스마트팩토리 2차 품목등록자료-20181211.xls</a><br><a href="#" class="documentEnrollBtn">동아대_스마트팩토리 2차 BOM등록자료-20181211.xls</a></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<td><input type="checkbox"></td>
|
||
|
|
<td>99</td>
|
||
|
|
<td>동아대학교</td>
|
||
|
|
<td>스마트팩토리 2차</td>
|
||
|
|
<td>기구</td>
|
||
|
|
<td>초도</td>
|
||
|
|
<td></td>
|
||
|
|
<td></td>
|
||
|
|
<td>2018-10-15</td>
|
||
|
|
<td>기구설계팀 조항만</td>
|
||
|
|
<td><a href="#" class="documentEnrollBtn">동아대_스마트팩토리 2차 품목등록자료-20181015.xls</a><br><a href="#" class="documentEnrollBtn">동아대_스마트팩토리 2차 BOM등록자료-20181015.xls</a></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<table class="pagenation_table">
|
||
|
|
<tr>
|
||
|
|
<td class="pagenation_pre"><a href="#">pre</a></td>
|
||
|
|
<td><a href="#" style="color:#f47624;">1</a></td>
|
||
|
|
<td><a href="#">2</a></td>
|
||
|
|
<td><a href="#">3</a></td>
|
||
|
|
<td><a href="#">4</a></td>
|
||
|
|
<td><a href="#">5</a></td>
|
||
|
|
<td class="pagenation_next"><a href="#">next</a></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
</section>
|
||
|
|
</form>
|
||
|
|
</body>
|
||
|
|
</html>
|