772 lines
25 KiB
Plaintext
772 lines
25 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@include file= "/init.jsp" %>
|
|
<%
|
|
// 권한 체크: AUTHORITY_MASTER의 OBJID가 41000668인 그룹에 속한 사용자 또는 관리자인지 확인
|
|
boolean hasStatusChangeAuth = false;
|
|
String menuName = "개발관리_E-BOM 등록"; // 기본값
|
|
try {
|
|
// 관리자는 자동으로 권한 부여
|
|
if(isAdmin) {
|
|
hasStatusChangeAuth = true;
|
|
} else {
|
|
org.apache.ibatis.session.SqlSession sqlSession = com.pms.common.SqlMapConfig.getInstance().getSqlSession();
|
|
java.util.Map<String, Object> authParam = new java.util.HashMap<String, Object>();
|
|
authParam.put("userId", connectUserId);
|
|
authParam.put("masterObjid", "41000668");
|
|
|
|
Integer authCount = (Integer)sqlSession.selectOne("common.checkUserAuthority", authParam);
|
|
hasStatusChangeAuth = (authCount != null && authCount > 0);
|
|
|
|
sqlSession.close();
|
|
}
|
|
|
|
// 메뉴 이름 조회 (공통 유틸 사용)
|
|
String menuObjId = request.getParameter("menuObjId");
|
|
menuName = CommonUtils.getMenuName(menuObjId, menuName);
|
|
} catch(Exception e) {
|
|
e.printStackTrace();
|
|
}
|
|
%>
|
|
<script>
|
|
var hasStatusChangeAuth = <%=hasStatusChangeAuth%>;
|
|
</script>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<!-- //JSTL 변수선언 -->
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
|
|
<script>
|
|
$(document).ready(function(){
|
|
|
|
//구조 등록
|
|
$("#btnSetStructure").click(function(){
|
|
|
|
if($("#product_code").val()==""){
|
|
Swal.fire('기종명을 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
if($("#product_mgmt_spec").val()==""){
|
|
Swal.fire('사양을 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
if($("#upg_no").val()==""){
|
|
Swal.fire('upg_no를 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
fn_openSetStandardInfo($("#product_code").val(),$("#product_mgmt_spec").val(),$("#upg_no").val());
|
|
});
|
|
//end of 구조 등록
|
|
|
|
|
|
//구조 등록
|
|
$("#btnBomCopy").click(function(){
|
|
if($("#product_code").val()==""){
|
|
Swal.fire('기종명을 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
fn_openSetBomCopy($("#product_code").val());
|
|
});
|
|
|
|
|
|
//상세 팝업
|
|
$(".btnDetail").click(function(){
|
|
var objId = $(this).attr("data-OBJID");
|
|
fn_openSetStructure(objId);
|
|
});
|
|
|
|
//상세 팝업
|
|
$("#btnDelete").click(function(){
|
|
fn_delete();
|
|
});
|
|
//end of 상세 팝업
|
|
|
|
//상태변경 버튼
|
|
$("#btnStatusChange").click(function(){
|
|
fn_openStatusChange();
|
|
});
|
|
|
|
//조회
|
|
$("#btnSearch").click(function(){
|
|
$("#page").val("1");
|
|
fn_search();
|
|
});
|
|
|
|
$("#btnDeploy").click(function(){
|
|
fn_deploy();
|
|
});
|
|
|
|
$("#SEARCH_PRODUCT_MGMT_OBJID").change(function(){
|
|
//fn_productUPGList(this.value, "SEARCH_PRODUCT_MGMT_UPG", "");
|
|
//fn_productVCList("","SEARCH_PRODUCT_MGMT_VC", "");
|
|
});
|
|
|
|
$("#SEARCH_PRODUCT_MGMT_UPG").change(function(){
|
|
fn_productVCList(this.value,"SEARCH_PRODUCT_MGMT_VC", "");
|
|
});
|
|
|
|
fnc_datepick("SEARCH_DEPLOY_DATE_FROM", "SEARCH_DEPLOY_DATE_TO");
|
|
|
|
//fnc_getProductMgmtList("SEARCH_PRODUCT_MGMT_OBJID", "${param.SEARCH_PRODUCT_MGMT_OBJID}");
|
|
|
|
fn_productSpecList("${param.product_code}", "product_mgmt_spec", "${param.product_mgmt_spec}");
|
|
|
|
|
|
fnc_getUserList2("SEARCH_WRITER", "${param.SEARCH_WRITER}");
|
|
|
|
|
|
/* $("#product_code").change(function(){
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
fn_productSpecList(this.value, "product_mgmt_spec", "${param.product_mgmt_spec}");
|
|
}); */
|
|
|
|
$("#customer_cd").change(function(){
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
fn_projectNameList(this.value, "project_name", "");
|
|
});
|
|
fn_projectNameList(this.value, "project_name", "");
|
|
|
|
|
|
$("#project_name").change(function(){
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
fn_UnitCodeList(this.value, "unit_code", "");
|
|
});
|
|
|
|
if("${param.customer_cd}"!=""){
|
|
fn_projectNameList("${param.customer_cd}", "project_name","");
|
|
$("#project_name").val("${param.project_name}");
|
|
|
|
}
|
|
|
|
if("${param.project_name}"!=""){
|
|
fn_UnitCodeList("${param.project_name}", "unit_code","${param.unit_code}");
|
|
$("#unit_code").val("${param.unit_code}");
|
|
}
|
|
|
|
|
|
$("#product_mgmt_spec").change(function(){
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
|
//fn_productSpecList(this.value, "product_mgmt_spec", "${param.product_mgmt_spec}");
|
|
|
|
fnc_productUPGNEWList("",this.value,"upg_no", "${param.upg_no}");
|
|
});
|
|
|
|
|
|
if("${param.product_code}"!=""){
|
|
|
|
fnc_productUPGNEWList("${param.product_code}","","upg_no", "");
|
|
$("#upg_no").val("${param.upg_no}");
|
|
|
|
}
|
|
|
|
$('.select2').select2();
|
|
|
|
fn_search();
|
|
});
|
|
|
|
var columns = [
|
|
/* {headerHozAlign : 'center', hozAlign : 'center', width : '60', title : '순', field : 'NUM' }, */
|
|
/* {headerHozAlign : 'center', hozAlign : 'left ', width : '120', title : '프로젝트번호', field : 'PROJECT_NO' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '140', title : '고객사', field : 'CUSTOMER_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '200', title : '고객사프로젝트명', field : 'CUSTOMER_PROJECT_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '270', title : '유닛명', field : 'UNIT_NAME' },*/
|
|
|
|
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '160', title : '제품구분', field : 'PRODUCT_NAME' },
|
|
// {headerHozAlign : 'center', hozAlign : 'center', title : '제품구분', field : 'PRODUCT_CD' ,hidden: true},
|
|
{headerHozAlign : 'center', hozAlign : 'left', width : '210', title : '품번', field : 'PART_NO' },
|
|
{headerHozAlign : 'center', hozAlign : 'left', title : '품명', field : 'PART_NAME' },
|
|
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '150', title : 'E-BOM', field : 'BOM_CNT',
|
|
formatter: fnc_subInfoValueFormatter,
|
|
cellClick:function(e, cell){
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
|
// 바로 팝업 열기 (팝업창 내부에서 경고 처리)
|
|
fn_openSetStructure(objId);
|
|
}
|
|
},
|
|
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '120', title : '등록자', field : 'DEPT_USER_NAME' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '130', title : '등록일', field : 'REG_DATE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '확정일', field : 'DEPLOY_DATE' },
|
|
// {headerHozAlign : 'center', hozAlign : 'center', width : '100', title : '배포일', field : 'DEPLOY_DATE' },
|
|
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '110', title : 'Version', field : 'REVISION' },
|
|
// {headerHozAlign : 'center', hozAlign : 'left', /* width : '200', */ title : '배포사유', field : 'NOTE' },
|
|
{headerHozAlign : 'center', hozAlign : 'center', width : '110', title : '상태', field : 'STATUS' }
|
|
];
|
|
|
|
//var grid;
|
|
function fn_search(){
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/partMng/searchStructureGridList.do", columns, true);
|
|
}
|
|
|
|
//양산제품에 해당하는 SPEC 정보 목록을 가져온다.
|
|
function fn_productSpecList(productObjId,selectboxId,selectedVal){
|
|
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productObjId){
|
|
$.ajax({
|
|
url:"/common/getProductSPECList.do",
|
|
type:"POST",
|
|
data:{"isJson":true,"TARGET_OBJID":productObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
resultList = data
|
|
|
|
if(0 < resultList.length){
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].OBJID;
|
|
var commonCodeName = resultList[i].SPEC_NAME;
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
|
|
function fn_productUPGList(productMgmtObjId,selectboxId,selectedVal){
|
|
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productMgmtObjId){
|
|
$.ajax({
|
|
url:"/common/getProductUPGList.do",
|
|
type:"POST",
|
|
data:{"isJson":true,"PRODUCT_MGMT_OBJID":productMgmtObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
resultList = data
|
|
|
|
if(0 < resultList.length){
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].CODE;
|
|
var commonCodeName = resultList[i].UPG_NAME+"("+resultList[i].SPEC_NAME+")";
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_productVCList(productUPGObjId,selectboxId,selectedVal){
|
|
|
|
$("#"+selectboxId).empty();
|
|
|
|
$("#"+selectboxId).append("<option value=''>선택</option>");
|
|
|
|
if("" != productUPGObjId){
|
|
$.ajax({
|
|
url:"/common/getProductUPGList.do",
|
|
type:"POST",
|
|
data:{"isJson":true,"PRODUCT_MGMT_UPG":productUPGObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
|
|
resultList = data
|
|
|
|
if(0 < resultList.length){
|
|
for (var i = 0; i < resultList.length; i++) {
|
|
var commonCodeId = resultList[i].CODE;
|
|
var commonCodeName = resultList[i].VC;
|
|
|
|
$("#"+selectboxId).append("<option value='"+commonCodeId+"'>"+commonCodeName+"</option>");
|
|
}
|
|
$("#"+selectboxId).val(selectedVal);
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
function fn_deploy() {
|
|
var selectedStructure = _tabulGrid.getSelectedData();
|
|
var objIdSubTask = fnc_checkNull(selectedStructure[0].OBJID);
|
|
|
|
var onlyMuti = true;
|
|
//onlyMuti = false;
|
|
/* 동시프로젝트 동시배포 체크(배포 사유부터 server로직까지 바꿔야해서 주석처리) */
|
|
var checkStatus = true;
|
|
var beforeOBJID = '';
|
|
for (var i = 0; i < selectedStructure.length; i++) {
|
|
var STATUS = fnc_checkNull(selectedStructure[i].STATUS);
|
|
if('deploy' == STATUS){
|
|
checkStatus = false;
|
|
break;
|
|
}
|
|
|
|
var MULTI_MASTER_OBJID = fnc_checkNullDefaultValue(selectedStructure[i].MULTI_MASTER_OBJID, selectedStructure[i].OBJID);
|
|
if(fnc_isEmpty(beforeOBJID) || MULTI_MASTER_OBJID == beforeOBJID){
|
|
beforeOBJID = MULTI_MASTER_OBJID;
|
|
}else{
|
|
onlyMuti = false;
|
|
}
|
|
}
|
|
if(!checkStatus){
|
|
Swal.fire('배포완료건은 배포 할 수 없습니다.');
|
|
return;
|
|
}
|
|
|
|
|
|
if(selectedStructure.length == 0){
|
|
Swal.fire("선택된 내용이 없습니다.");
|
|
return false;
|
|
}else if(!onlyMuti && 1 < selectedStructure.length){
|
|
Swal.fire("한번에 한개의 배포만 가능합니다.(동시 프로젝트 등록중인 건만 동시배포 가능합니다.)"); //
|
|
return false;
|
|
}else{
|
|
|
|
var checkStatus = true;
|
|
var selectedData = _tabulGrid.getSelectedData();
|
|
|
|
var STATUS = fnc_checkNull(selectedData[0].STATUS);
|
|
if('deploy' == STATUS){
|
|
checkStatus = false;
|
|
}
|
|
|
|
if(!checkStatus){
|
|
Swal.fire('배포완료건은 배포 할 수 없습니다.');
|
|
return;
|
|
}
|
|
|
|
var chkArray = [];
|
|
for (var i = 0; i < selectedStructure.length; i++) {
|
|
var objId = fnc_checkNull(selectedStructure[i].OBJID);
|
|
chkArray.push(objId);
|
|
}
|
|
objIdSubTask = chkArray.join(",");
|
|
|
|
//var checkArr = selectedStructure.val();
|
|
//if(confirm("선택된 내용을 배포하시겠습니까?")){
|
|
Swal.fire({
|
|
title: '선택된 내용을 배포하시겠습니까?',
|
|
text: '',
|
|
icon: 'warning',
|
|
showCancelButton: true, // cancel버튼 보이기. 기본은 원래 없음
|
|
confirmButtonColor: '#3085d6', // confrim 버튼 색깔 지정
|
|
cancelButtonColor: '#d33', // cancel 버튼 색깔 지정
|
|
confirmButtonText: '확인', // confirm 버튼 텍스트 지정
|
|
cancelButtonText: '취소', // cancel 버튼 텍스트 지정
|
|
reverseButtons: false, // 버튼 순서 거꾸로
|
|
}).then(result => {
|
|
// 만약 Promise리턴을 받으면,
|
|
if (result.isConfirmed) { // 만약 모달창에서 confirm 버튼을 눌렀다면
|
|
//Swal.fire("배포사유를 입력해 주세요");
|
|
fn_openChangeDesignNote(objIdSubTask);
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
function fn_delete() {
|
|
var selectedStructure = _tabulGrid.getSelectedData();
|
|
|
|
if(0 < selectedStructure.length){
|
|
|
|
var chkArray = [];
|
|
|
|
for (var i = 0; i < selectedStructure.length; i++) {
|
|
var objId = fnc_checkNull(selectedStructure[i].OBJID);
|
|
chkArray.push(objId);
|
|
}
|
|
|
|
|
|
var checkStatus = true;
|
|
var selectedData = _tabulGrid.getSelectedData();
|
|
|
|
var STATUS = fnc_checkNull(selectedData[0].STATUS);
|
|
if('deploy' == STATUS || 'changeDesign' == STATUS){
|
|
checkStatus = false;
|
|
}
|
|
|
|
if(!checkStatus){
|
|
Swal.fire('배포완료/설계변경미배포 건은 삭제 할 수 없습니다.');
|
|
return;
|
|
}
|
|
|
|
//if(confirm("선택된 내용을 삭제하시겠습니까?")){
|
|
Swal.fire({
|
|
title: '선택한 정보를 삭제하시겠습니까?',
|
|
text: '',
|
|
icon: 'warning',
|
|
|
|
showCancelButton: true, // cancel버튼 보이기. 기본은 원래 없음
|
|
confirmButtonColor: '#3085d6', // confrim 버튼 색깔 지정
|
|
cancelButtonColor: '#d33', // cancel 버튼 색깔 지정
|
|
confirmButtonText: '확인', // confirm 버튼 텍스트 지정
|
|
cancelButtonText: '취소', // cancel 버튼 텍스트 지정
|
|
reverseButtons: false, // 버튼 순서 거꾸로
|
|
|
|
}).then(result => {
|
|
// 만약 Promise리턴을 받으면,
|
|
if (result.isConfirmed) { // 만약 모달창에서 confirm 버튼을 눌렀다면
|
|
$.ajax({
|
|
url:"/partMng/deleteStructure.do",
|
|
type:"POST",
|
|
data:{"checkArr":chkArray.join(",")},
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.fire(data.msg);
|
|
fn_search();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}else{
|
|
Swal.fire("선택된 내용이 없습니다.");
|
|
return false;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 구조 기준정보 팝업
|
|
*/
|
|
function fn_openSetStandardInfo(product_code,product_mgmt_spec,upg_no){
|
|
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/partMng/setStructureStandardFormPopup.do";
|
|
var target = "setStructureStandardFormPopup";
|
|
window.open(url,target,"width=500, height=260, menubars=no, scrollbars=yes, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.param_product_code.value = product_code;
|
|
hiddenForm.param_product_mgmt_spec.value = product_mgmt_spec;
|
|
hiddenForm.param_upg_no.value = upg_no;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
/**
|
|
* bom copy 팝업
|
|
*/
|
|
function fn_openSetBomCopy(product_code){
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/partMng/setBomCopyFormPopup.do";
|
|
var target = "setBomCopyFormPopup";
|
|
window.open(url,target,"width=1100, height=360, menubars=no, scrollbars=yes, resizable=yes");
|
|
|
|
hiddenForm.action = url;
|
|
hiddenForm.param_product_code.value = product_code;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
|
|
/**
|
|
* 구조등록 팝업
|
|
*/
|
|
function fn_openSetStructure(objId){
|
|
window.open("/partMng/setStructurePopupMainFS.do?objId="+objId, "", "width=1880, height=900, resizable=yes");
|
|
}
|
|
/**
|
|
* 배포사유 입력 팝업
|
|
*/
|
|
function fn_openChangeDesignNote(objId){
|
|
window.open("/partMng/changeDesignNotePopUp.do?objId="+objId, "", "width=1000, height=200, resizable=no");
|
|
}
|
|
|
|
/**
|
|
* 상태변경 팝업
|
|
*/
|
|
function fn_openStatusChange() {
|
|
// 권한 체크
|
|
if(!hasStatusChangeAuth) {
|
|
Swal.fire({
|
|
title: '권한 없음',
|
|
text: '상태변경 권한이 없습니다.',
|
|
icon: 'error'
|
|
});
|
|
return false;
|
|
}
|
|
|
|
var selectedStructure = _tabulGrid.getSelectedData();
|
|
|
|
if(selectedStructure.length == 0){
|
|
Swal.fire("선택된 내용이 없습니다.");
|
|
return false;
|
|
}
|
|
|
|
if(selectedStructure.length > 1){
|
|
Swal.fire('단건만 선택 가능합니다.');
|
|
return;
|
|
}
|
|
|
|
var selectedData = selectedStructure[0];
|
|
var objId = fnc_checkNull(selectedData.OBJID);
|
|
var partNo = fnc_checkNull(selectedData.PART_NO);
|
|
var partName = fnc_checkNull(selectedData.PART_NAME);
|
|
var currentStatus = fnc_checkNull(selectedData.STATUS);
|
|
|
|
// 현재 상태 표시용 텍스트 (Y/N만 존재)
|
|
var statusText = (currentStatus === 'Y') ? 'Y' : 'N';
|
|
|
|
// 상태변경 확인 경고
|
|
Swal.fire({
|
|
title: 'E-BOM 상태 변경',
|
|
html: 'E-BOM의 상태변경을 진행하시겠습니까?<br><br>' +
|
|
'<strong>품번:</strong> ' + partNo + '<br>' +
|
|
'<strong>품명:</strong> ' + partName + '<br>' +
|
|
'<strong>현재 상태:</strong> ' + statusText + '<br><br>' +
|
|
'상태를 변경하시겠습니까?',
|
|
icon: 'warning',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: '상태변경',
|
|
cancelButtonText: '취소',
|
|
reverseButtons: false
|
|
}).then(result => {
|
|
if (result.isConfirmed) {
|
|
window.open("/partMng/structureStatusChangePopup.do?objId=" + objId, "structureStatusChangePopup", "width=500, height=300, resizable=no");
|
|
}
|
|
});
|
|
}
|
|
|
|
function saveexcelpop() {
|
|
var selectedStructure = _tabulGrid.getSelectedData();
|
|
|
|
if(0 < selectedStructure.length){
|
|
if(selectedStructure.length > 1){
|
|
Swal.fire('단건만 등록 가능합니다.');
|
|
return;
|
|
}else{
|
|
|
|
var STATUS = fnc_checkNull(selectedStructure[0].STATUS);
|
|
|
|
if(STATUS != 'N'){ //deploy
|
|
Swal.fire('등록중인 건만 등록/추가 할 수 있습니다.');
|
|
return;
|
|
}
|
|
|
|
var customer_cd = "";
|
|
var project_name ="";
|
|
var unit_code ="";
|
|
var BOM_REPORT_OBJID ="";
|
|
var BOM_PART_NO ="";
|
|
var BOM_PART_NAME ="";
|
|
var BOM_PRODUCT_CD ="";
|
|
var BOM_VERSION ="";
|
|
|
|
for (var i = 0; i < selectedStructure.length; i++) {
|
|
//customer_cd = fnc_checkNull(selectedStructure[i].CUSTOMER_OBJID);
|
|
//project_name = fnc_checkNull(selectedStructure[i].CONTRACT_OBJID);
|
|
//unit_code = fnc_checkNull(selectedStructure[i].UNIT_CODE);
|
|
BOM_REPORT_OBJID = fnc_checkNull(selectedStructure[i].OBJID);
|
|
BOM_PART_NO = fnc_checkNull(selectedStructure[i].PART_NO);
|
|
BOM_PART_NAME = fnc_checkNull(selectedStructure[i].PART_NAME);
|
|
BOM_PRODUCT_CD = fnc_checkNull(selectedStructure[i].PRODUCT_CD);
|
|
BOM_VERSION = fnc_checkNull(selectedStructure[i].REVISION);
|
|
}
|
|
|
|
// CSV 업로드 확인 경고
|
|
Swal.fire({
|
|
title: 'E-BOM CSV 업로드',
|
|
html: 'CSV 파일을 통해 E-BOM 데이터를 새로 등록합니다.<br><br>' +
|
|
'<strong>품번:</strong> ' + BOM_PART_NO + '<br>' +
|
|
'<strong>품명:</strong> ' + BOM_PART_NAME + '<br>' +
|
|
'<strong>버전:</strong> ' + BOM_VERSION + '<br><br>' +
|
|
'계속하시겠습니까?',
|
|
icon: 'question',
|
|
showCancelButton: true,
|
|
confirmButtonColor: '#3085d6',
|
|
cancelButtonColor: '#d33',
|
|
confirmButtonText: '계속',
|
|
cancelButtonText: '취소',
|
|
reverseButtons: false
|
|
}).then(result => {
|
|
if (result.isConfirmed) {
|
|
// hiddenForm을 사용하여 POST 방식으로 팝업 열기 (한글 인코딩 문제 해결)
|
|
var hiddenForm = document.hiddenForm;
|
|
var url = "/partMng/openBomReportExcelImportPopUp.do";
|
|
var target = "openBomReportExcelImportPopUp";
|
|
|
|
hiddenForm.PRODUCT_CD.value = BOM_PRODUCT_CD;
|
|
hiddenForm.BOM_PART_NAME.value = BOM_PART_NAME;
|
|
hiddenForm.BOM_PART_NO.value = BOM_PART_NO;
|
|
hiddenForm.BOM_REPORT_OBJID.value = BOM_REPORT_OBJID;
|
|
hiddenForm.BOM_VERSION.value = BOM_VERSION;
|
|
|
|
window.open('', target, 'width=1920, height=860, menubars=no, scrollbars=yes, resizable=yes');
|
|
hiddenForm.action = url;
|
|
hiddenForm.target = target;
|
|
hiddenForm.submit();
|
|
}
|
|
});
|
|
}
|
|
}else{
|
|
if($("#customer_cd").val()==""){
|
|
Swal.fire('고객사를 선택해 주세요');
|
|
return;
|
|
}
|
|
if($("#project_name").val()==""){
|
|
Swal.fire('프로젝트를 선택해 주세요');
|
|
return;
|
|
}
|
|
if($("#unit_code").val()==""){
|
|
Swal.fire('유닛명을 선택해 주세요');
|
|
return;
|
|
}
|
|
|
|
var url = "/partMng/openBomReportExcelImportPopUp.do?customer_cd="+$("#customer_cd").val()+"&project_name="+$("#project_name").val()+"&unit_code="+$("#unit_code").val();
|
|
var target = "openBomReportExcelImportPopUp";
|
|
window.open(url, target,"width=1920, height=860, menubars=no, scrollbars=yes, resizable=yes");
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
|
<input type="hidden" name="param_product_code" id="param_product_code">
|
|
<input type="hidden" name="param_product_mgmt_spec" id="param_product_mgmt_spec">
|
|
<input type="hidden" name="param_upg_no" id="param_upg_no">
|
|
<input type="hidden" name="BOM_REPORT_OBJID" id="BOM_REPORT_OBJID">
|
|
<!-- BOM Excel Import 팝업용 파라미터 -->
|
|
<input type="hidden" name="PRODUCT_CD" id="PRODUCT_CD">
|
|
<input type="hidden" name="BOM_PART_NAME" id="BOM_PART_NAME">
|
|
<input type="hidden" name="BOM_PART_NO" id="BOM_PART_NO">
|
|
<input type="hidden" name="BOM_VERSION" id="BOM_VERSION">
|
|
</form>
|
|
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<div class="min_part_enroll">
|
|
<div class="content-box">
|
|
<div class="content-box-s">
|
|
<div class="plm_menu_name_gdnsi">
|
|
<h2>
|
|
<span><%=menuName%></span>
|
|
</h2>
|
|
<div class="btnArea">
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch">
|
|
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
|
|
<!-- <input type="button" value="PDM>ERP업로드" class="plm_btns" id="btnPDMERPUpload"> -->
|
|
<input type="button" value="E-BOM등록" class="plm_btns" onclick="saveexcelpop();">
|
|
<input type="button" value="상태변경" class="plm_btns" id="btnStatusChange">
|
|
<!-- <input type="button" value="배포" class="plm_btns" id="btnDeploy"> -->
|
|
</div>
|
|
</div>
|
|
|
|
<div id="plmSearchZon">
|
|
<table>
|
|
<tr>
|
|
<!-- <td><label for="customer_cd">고객사</label></td>
|
|
<td>
|
|
<select name="customer_cd" id="customer_cd" style="width:170px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.customer_cd}
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="project_name">프로젝트번호</label></td>
|
|
<td>
|
|
<select name="project_name" id="project_name" style="width:230px" class="select2" autocomplete="off">
|
|
</select>
|
|
</td>
|
|
|
|
<td><label for="unit_code">유닛명</label></td>
|
|
<td>
|
|
<select name="unit_code" id="unit_code" style="width:300px" class="select2" autocomplete="off">
|
|
</select>
|
|
</td>
|
|
|
|
<td class="label"><label for="">공통유닛명</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_UNIT_NAME" id="SEARCH_UNIT_NAME">
|
|
</td>
|
|
|
|
<td class="align_r">
|
|
<label>등록자</label>
|
|
</td>
|
|
<td>
|
|
<select name="SEARCH_WRITER" id="SEARCH_WRITER" style="width:190px;" autocomplete="off" class="select2"></select>
|
|
</td> -->
|
|
|
|
|
|
<td><label for="product_cd">제품구분</label></td>
|
|
<td>
|
|
<select name="product_cd" id="product_cd" style="width:170px" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.product_cd}
|
|
</select>
|
|
</td>
|
|
|
|
|
|
<td class="label"><label for="">품번</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_PART_NO" id="SEARCH_PART_NO" style="width:250px;">
|
|
</td>
|
|
|
|
<td class="label"><label for="">품명</label></td>
|
|
<td>
|
|
<input type="text" name="SEARCH_PART_NAME" id="SEARCH_PART_NAME" style="width:250px;">
|
|
</td>
|
|
|
|
|
|
<td class="align_r">
|
|
<label>등록일</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="search_fromDate" id="search_fromDate" style="width:90px;" autocomplete="off" value="${param.search_fromDate}">~
|
|
<input type="text" name="search_toDate" id="search_toDate" style="width:90px;" autocomplete="off" value="${param.search_toDate}">
|
|
</td>
|
|
|
|
<td><label for="status">상태</label></td>
|
|
<td>
|
|
<select id="status" name="status" class="select2" style="width:170px;">
|
|
<option value="">선택</option>
|
|
<option value="Y" ${param.status eq 'Y'?'selected':''}>Y</option>
|
|
<option value="N" ${param.status eq 'N'?'selected':''}>N</option>
|
|
<!-- <option value="create" ${param.status eq 'create'?'selected':''}>등록중</option>
|
|
<option value="changeDesign" ${param.status eq 'changeDesign'?'selected':''}>설계변경미배포</option>
|
|
<option value="deploy"${param.status eq 'deploy'?'selected':''}>배포완료</option> -->
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
</table>
|
|
</div>
|
|
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |