652 lines
27 KiB
Plaintext
652 lines
27 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" %>
|
||
|
|
|
||
|
|
<!DOCTYPE html>
|
||
|
|
<html>
|
||
|
|
<head>
|
||
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
||
|
|
|
||
|
|
<style type="text/css">
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<!--
|
||
|
|
<script type="text/javascript" src="/js/tabulator/tabulator_custom.js"></script>
|
||
|
|
-->
|
||
|
|
<script type="text/javascript">
|
||
|
|
var _editable = true;
|
||
|
|
|
||
|
|
var _PART_TYPE_LIST;
|
||
|
|
var _CHANGE_TYPE_LIST;
|
||
|
|
var _CHANGE_OPTION_LIST;
|
||
|
|
|
||
|
|
$(function() {
|
||
|
|
$(document).ready(function() {
|
||
|
|
|
||
|
|
var defaultOptions = []; //[{"CODE_ID":'',"CODE_NAME":"선택"}];
|
||
|
|
_PART_TYPE_LIST = defaultOptions.concat(fnc_getCodeList("<%=Constants.PART_TYPE_CODE%>"));
|
||
|
|
_CHANGE_TYPE_LIST = defaultOptions.concat(fnc_getCodeList("<%=Constants.PART_CHANGE_TYPE_CODE%>"));
|
||
|
|
_CHANGE_OPTION_LIST = defaultOptions.concat(fnc_getCodeList("<%=Constants.PART_CHANGE_OPTION_CODE%>"));
|
||
|
|
//alert(_PART_TYPE_LIST + ":" + _PART_TYPE_LIST.length);
|
||
|
|
|
||
|
|
fnc_datepick();
|
||
|
|
|
||
|
|
$("input[type=text]").keyup(function(e) {
|
||
|
|
if (e.keyCode == 13)
|
||
|
|
fn_search();
|
||
|
|
});
|
||
|
|
|
||
|
|
$("#btnSave").click(function(){
|
||
|
|
});
|
||
|
|
$("#btnChange").click(function(){
|
||
|
|
//_editable = true;
|
||
|
|
fn_save();
|
||
|
|
//_tabulGrid.getRow(1).startEdit();
|
||
|
|
//_tabulGrid.getRow(1).cancelEdit();
|
||
|
|
|
||
|
|
// 전체 테이블의 편집 모드를 활성화
|
||
|
|
//_tabulGrid.setMode("edit");
|
||
|
|
|
||
|
|
// 전체 테이블의 편집 모드를 비활성화
|
||
|
|
//_tabulGrid.setMode("normal");
|
||
|
|
//_tabulGrid.setEditable = false;
|
||
|
|
//_tabulGrid.editable = false;
|
||
|
|
|
||
|
|
// 'name' 컬럼을 편집 가능하도록 설정
|
||
|
|
//_tabulGrid.getColumn('name').clearEditor();
|
||
|
|
|
||
|
|
// 'age' 컬럼을 읽기 전용으로 설정
|
||
|
|
//_tabulGrid.getColumn('age').setEditor(false);
|
||
|
|
});
|
||
|
|
|
||
|
|
$("#btnDelete").click(function(){
|
||
|
|
//fn_deletePartMng();
|
||
|
|
});
|
||
|
|
$("#btnDeploy").click(function(){
|
||
|
|
//fn_partMngDeploy();
|
||
|
|
});
|
||
|
|
|
||
|
|
//image src encoding
|
||
|
|
$("img").each(function(i) {
|
||
|
|
var imgSrc = $(this).attr("data-SRC");
|
||
|
|
$(this).attr("src", encodeURI(imgSrc));
|
||
|
|
});
|
||
|
|
|
||
|
|
$("#btnSearch").click(function() {
|
||
|
|
|
||
|
|
/* if($("#product_code").val()==""){
|
||
|
|
Swal.fire('기종을 선택해주세요');
|
||
|
|
return;
|
||
|
|
} */
|
||
|
|
|
||
|
|
fn_search();
|
||
|
|
});
|
||
|
|
|
||
|
|
$("#btnExcel").click(function() {
|
||
|
|
fn_excel();
|
||
|
|
});
|
||
|
|
|
||
|
|
$("#customer_cd").change(function(){
|
||
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
||
|
|
});
|
||
|
|
fn_projectNameList(this.value, "project_name", "");
|
||
|
|
|
||
|
|
$("#project_name").change(function(){
|
||
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
||
|
|
fn_UnitCodeList(this.value, "unit_code", "");
|
||
|
|
});
|
||
|
|
$("#unit_code").change(function(){
|
||
|
|
//fnc_productUPGNEWList(this.value,"","upg_no", "");
|
||
|
|
//fn_BomPartList($("#project_name").val(), this.value, "SEARCH_PART_OBJID", "");
|
||
|
|
fn_BomPartLastList($("#project_name").val(), this.value, "SEARCH_PART_OBJID", "");
|
||
|
|
});
|
||
|
|
|
||
|
|
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}");
|
||
|
|
}
|
||
|
|
if("${param.project_name}"!="" && "${param.unit_code}"!=""){
|
||
|
|
//fn_BomPartList("${param.project_name}", "${param.unit_code}", "SEARCH_PART_OBJID", "");
|
||
|
|
fn_BomPartLastList("${param.project_name}", "${param.unit_code}", "SEARCH_PART_OBJID", "");
|
||
|
|
}
|
||
|
|
|
||
|
|
/*
|
||
|
|
//for test
|
||
|
|
$("#project_name").val('-144786899');//for test
|
||
|
|
$("#unit_code").val('736650247');//for test
|
||
|
|
fn_UnitCodeList("-144786899", "unit_code","736650247");
|
||
|
|
fn_BomPartLastList("-144786899", "736650247", "SEARCH_PART_OBJID", ""); //for test
|
||
|
|
$("#SEARCH_PART_OBJID").val('1274817120');//for test
|
||
|
|
*/
|
||
|
|
|
||
|
|
|
||
|
|
$("#product_code").change(function(){
|
||
|
|
fnc_productUPGNEWList(this.value,"","upg_no", "");
|
||
|
|
});
|
||
|
|
|
||
|
|
if("${param.product_code}"!=""){
|
||
|
|
fnc_productUPGNEWList("${param.product_code}","","upg_no", "");
|
||
|
|
$("#upg_no").val("${param.upg_no}");
|
||
|
|
}
|
||
|
|
|
||
|
|
fnc_getCodeListAppend("<%=Constants.PART_TYPE_CODE%>","SEARCH_PART_TYPE","${param.SEARCH_PART_TYPE}");
|
||
|
|
|
||
|
|
$("#SEARCH_REVISION_RELEASE").val("${param.SEARCH_REVISION_RELEASE}");
|
||
|
|
|
||
|
|
if("${param.SEARCH_REVISION_RELEASE}"==""){
|
||
|
|
$("#SEARCH_REVISION_RELEASE").val("0");
|
||
|
|
}
|
||
|
|
|
||
|
|
$('.select2').select2();
|
||
|
|
|
||
|
|
fn_search();
|
||
|
|
|
||
|
|
_tabulGrid.on("cellEdited", function(cell){
|
||
|
|
//alert('celedited');
|
||
|
|
var row = cell.getRow();
|
||
|
|
var rowData = row.getData();
|
||
|
|
var PART_NO = rowData.PART_NO;
|
||
|
|
//var MATERIAL = rowData.MATERIAL;
|
||
|
|
var sameRows = _tabulGrid.searchRows("PART_NO", "=", PART_NO);
|
||
|
|
sameRows.forEach(function (sameRow) {
|
||
|
|
//var PART_NO = fnc_checkNull(sameRow.getData().PART_NO);
|
||
|
|
var sameRowData = sameRow.getData();
|
||
|
|
//alert(rowData.Q_STATUS);
|
||
|
|
/*
|
||
|
|
if('beforeEdit' == rowData.Q_STATUS){
|
||
|
|
alert('설변중인 파트입니다. 배포후에 다시 설계변경 할 수 있습니다.');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
sameRowData.PART_NAME = rowData.PART_NAME;
|
||
|
|
//sameRowData.CHANGE_TYPE_TITLE = rowData.CHANGE_TYPE_TITLE;
|
||
|
|
//sameRowData.CHANGE_OPTION_TITLE = rowData.CHANGE_OPTION_TITLE;
|
||
|
|
//sameRowData.PART_TYPE_TITLE = rowData.PART_TYPE_TITLE;
|
||
|
|
sameRowData.CHANGE_TYPE = rowData.CHANGE_TYPE;
|
||
|
|
sameRowData.CHANGE_OPTION = rowData.CHANGE_OPTION;
|
||
|
|
sameRowData.PART_TYPE = rowData.PART_TYPE;
|
||
|
|
sameRowData.MATERIAL = rowData.MATERIAL;
|
||
|
|
sameRowData.SPEC = rowData.SPEC;
|
||
|
|
sameRowData.POST_PROCESSING = rowData.POST_PROCESSING;
|
||
|
|
sameRowData.MAKER = rowData.MAKER;
|
||
|
|
sameRowData.REMARK = rowData.REMARK;
|
||
|
|
sameRowData.MAJOR_CATEGORY = rowData.MAJOR_CATEGORY;
|
||
|
|
sameRowData.SUB_CATEGORY = rowData.SUB_CATEGORY;
|
||
|
|
sameRow.update(sameRowData);
|
||
|
|
//sameRow.update(sameRow.getData());
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|
||
|
|
});
|
||
|
|
|
||
|
|
<%--
|
||
|
|
//select mode
|
||
|
|
var columns = [
|
||
|
|
{title:'OBJID', field:'OBJID' ,visible:false },
|
||
|
|
|
||
|
|
//{headerHozAlign:'center', hozAlign:'center', width:'30', title:'순', field:'NUM' , headersorting:false},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left ', width:'100', title:'프로젝트번호', field:'PROJECT_NO' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', /* width:'200', */title:'유닛명', field:'UNIT_NAME' },
|
||
|
|
/*
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'140', title:'고객사', field:'CUSTOMER_NAME' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'고객사프로젝트명', field:'CUSTOMER_PROJECT_NAME' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'E-BOM', field:'BOM_CNT',
|
||
|
|
formatter: fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objId = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
//var bomReportObjId = fnc_checkNull(cell.getData().BOM_REPORMECHANICAL_TYPET_OBJID);
|
||
|
|
fn_openSetStructure(objId);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
*/
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'125', title:'모품번', field:'PARENT_PART_INFO' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'125', title:'품번', field:'PART_NO',
|
||
|
|
formatter:fnc_createGridAnchorTag,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
//var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID_ORG);
|
||
|
|
openPartMngPopup(objid);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
//{headerHozAlign:'center', hozAlign:'right' , width:'80', title:'할인금액', field:"DISCOUNT_PRICE" , formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', /* width:'270', */ title:'품명', field:'PART_NAME' //},
|
||
|
|
/*
|
||
|
|
,editor:"input", editorParams:{
|
||
|
|
min:1, max:99999999, maxlength:10,//step:10, mask:"999",
|
||
|
|
elementAttributes:{ maxlength:"10", pattern:"\d*",min:1, max:9, oninput:"fnc_maxLengthCheck(this)" },
|
||
|
|
selectContents:true, verticalNavigation:"table", //up and down arrow keys navigate away from cell without changing value
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'50', title:'수량', field:'Q_QTY' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'45', title:'3D', field:'CU01_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '3D_CAD';
|
||
|
|
var docTypeName = '3D CAD 첨부파일';
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'45', title:'2D', field:'CU02_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '2D_DRAWING_CAD';
|
||
|
|
var docTypeName = '2D(Drawing) CAD 첨부파일';
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'55', title:'PDF', field:'CU03_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '2D_PDF_CAD';
|
||
|
|
var docTypeName = '2D(PDF) CAD 첨부파일';
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'90', title:'재질', field:'MATERIAL' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'90', title:'사양(규격)', field:'SPEC' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'후처리', field:'POST_PROCESSING' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'MAKER', field:'MAKER' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'Revision', field:'REVISION' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'EO No', field:'EO_NO' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'EO Date', field:'EO_DATE' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'88', title:'PART구분', field:'PART_TYPE_TITLE' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'비고', field:'REMARK' }
|
||
|
|
];
|
||
|
|
--%>
|
||
|
|
|
||
|
|
//var grid;
|
||
|
|
function fn_search(){
|
||
|
|
|
||
|
|
//edit mode
|
||
|
|
var columns2 = [
|
||
|
|
{title:'OBJID', field:'OBJID' ,visible:false ,frozen:true },
|
||
|
|
//{headerHozAlign:'center', hozAlign:'center', width:'30', title:'순', field:'NUM' , headersorting:false},
|
||
|
|
{headerHozAlign:'center', hozAlign:'left ', width:'100', title:'프로젝트번호', field:'PROJECT_NO' ,frozen:true },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'유닛명', field:'UNIT_NAME' ,frozen:true },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'125', title:'모품번', field:'PARENT_PART_INFO' ,frozen:true },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'125', title:'품번', field:'PART_NO' ,frozen:true ,
|
||
|
|
formatter:fnc_createGridAnchorTag,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
//var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID_ORG);
|
||
|
|
openPartMngPopup(objid);
|
||
|
|
}
|
||
|
|
},
|
||
|
|
//{headerHozAlign:'center', hozAlign:'right' , width:'80', title:'할인금액', field:"DISCOUNT_PRICE" , formatter:"money", formatterParams:{ thousand:",", symbolAfter:"p", precision:false, },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'270', title:'품명', field:'PART_NAME' ,frozen:true/* ,editor:"input" , editable:editCheck, editorParams:{} */ },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'50', title:'<font style="color:#FFBB00;">수량</font>', field:'Q_QTY' ,editor:"number", editable:editCheck2, editorParams:{
|
||
|
|
min:1, max:99999, maxlength:5,//step:10, mask:"999",
|
||
|
|
elementAttributes:{ maxlength:"5", pattern:"\d*",min:1, max:99999, oninput:"fnc_maxLengthCheck(this)" },
|
||
|
|
selectContents:true, verticalNavigation:"table", //up and down arrow keys navigate away from cell without changing value
|
||
|
|
} },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'45', title:'<font style="color:#FFBB00;">3D</font>', field:'CU01_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
//var objid = fnc_checkNull(cell.getData().LAST_PART_OBJID);
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '3D_CAD';
|
||
|
|
var docTypeName = '3D CAD 첨부파일';
|
||
|
|
if(_editable && cell.getData().PART_SEQ == 1){
|
||
|
|
//fnc_fileRegist(objid, docType, docTypeName);
|
||
|
|
fnc_fileRegist(objid, docType, docTypeName,'', false, 'CU01_CNT', "fnc_tabulCallbackFnc");
|
||
|
|
}else{
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'45', title:'<font style="color:#FFBB00;">2D</font>', field:'CU02_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '2D_DRAWING_CAD';
|
||
|
|
var docTypeName = '2D(Drawing) CAD 첨부파일';
|
||
|
|
if(_editable && cell.getData().PART_SEQ == 1){
|
||
|
|
fnc_fileRegist(objid, docType, docTypeName);
|
||
|
|
}else{
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'55', title:'<font style="color:#FFBB00;">PDF</font>', field:'CU03_CNT',
|
||
|
|
formatter:fnc_subInfoValueFormatter,
|
||
|
|
cellClick:function(e, cell){
|
||
|
|
var objid = fnc_checkNull(cell.getData().OBJID);
|
||
|
|
var docType = '2D_PDF_CAD';
|
||
|
|
var docTypeName = '2D(PDF) CAD 첨부파일';
|
||
|
|
if(_editable && cell.getData().PART_SEQ == 1){
|
||
|
|
fnc_fileRegist(objid, docType, docTypeName);
|
||
|
|
}else{
|
||
|
|
fnc_fileDetailPopup(objid, docType, docTypeName);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
/*
|
||
|
|
editable:function(cell) {
|
||
|
|
var row = cell.getRow();
|
||
|
|
//alert(cell.getData().PART_SEQ);
|
||
|
|
//console.log(row);
|
||
|
|
//alert(row.getIndex());
|
||
|
|
return _editable && cell.getData().PART_SEQ == 1; //cell.getRow().getIndex()%2;
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'88',/*editor:"input", editorParams:{},*/editable:editCheck, title :'<font style="color:#FFBB00;">EO구분</font>', field:'CHANGE_TYPE'
|
||
|
|
,editor: fnc_customSelectEditor
|
||
|
|
,formatter:fnc_customSelectFormatter
|
||
|
|
,editorParams: {valueId:"CODE_ID", labelId:"CODE_NAME", values:_CHANGE_TYPE_LIST}
|
||
|
|
,formatterParams:{valueId:"CODE_ID", labelId:"CODE_NAME", values:_CHANGE_TYPE_LIST}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'88',/*editor:"input", editorParams:{},*/editable:editCheck, title :'<font style="color:#FFBB00;">EO사유</font>', field:'CHANGE_OPTION', formatter:'rgba(255,0,0,0)'
|
||
|
|
,editor: fnc_customSelectEditor
|
||
|
|
,formatter:fnc_customSelectFormatter
|
||
|
|
,editorParams: {valueId:"CODE_ID", labelId:"CODE_NAME", values:_CHANGE_OPTION_LIST}
|
||
|
|
,formatterParams:{valueId:"CODE_ID", labelId:"CODE_NAME", values:_CHANGE_OPTION_LIST}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'88',/*editor:"input", editorParams:{},*/editable:editCheck, title :'<font style="color:#FFBB00;">PART구분</font>', field:'PART_TYPE'
|
||
|
|
,editor: fnc_customSelectEditor
|
||
|
|
,formatter:fnc_customSelectFormatter
|
||
|
|
,editorParams: {valueId:"CODE_ID", labelId:"CODE_NAME", values:_PART_TYPE_LIST}
|
||
|
|
,formatterParams:{valueId:"CODE_ID", labelId:"CODE_NAME", values:_PART_TYPE_LIST}
|
||
|
|
},
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'90',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">재질</font>', field:'MATERIAL' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'left', width:'90',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">사양(규격)</font>', field:'SPEC' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">후처리</font>', field:'POST_PROCESSING' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">MAKER</font>', field:'MAKER' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'90',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">대분류</font>', field:'MAJOR_CATEGORY' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'90',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">중분류</font>', field:'SUB_CATEGORY' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80',/* editor:"", */ editorParams:{}, title :'Revision', field:'REVISION' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'90',/* editor:"", */ editorParams:{}, title :'EO No', field:'EO_NO' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80',/* editor:"", */ editorParams:{}, title :'EO Date', field:'EO_DATE' },
|
||
|
|
{headerHozAlign:'center', hozAlign:'center', width:'80',editor:"input", editorParams:{}, editable:editCheck, title :'<font style="color:#FFBB00;">비고</font>', field:'REMARK' }
|
||
|
|
];
|
||
|
|
|
||
|
|
//if(fnc_validate('form1')){
|
||
|
|
//partMngGridList.do
|
||
|
|
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/partMng/partMngChangeGridListPaging.do", columns2, null, null, false, null, true, null, null, null, true);
|
||
|
|
//_tabulGrid.getRow(1).startEdit();
|
||
|
|
//}
|
||
|
|
}
|
||
|
|
|
||
|
|
var _idx = 1;
|
||
|
|
//var editCheck = function (cell) {
|
||
|
|
function editCheck2 (cell) {
|
||
|
|
return _editable;
|
||
|
|
}
|
||
|
|
function editCheck (cell) {
|
||
|
|
//var isEditable = (_idx%2 == 0);
|
||
|
|
//_idx++;
|
||
|
|
// console.log(cell._cell.row.cells[3].value)
|
||
|
|
/*
|
||
|
|
if('beforeEdit' == cell.getData().Q_STATUS){
|
||
|
|
alert('설변중인 파트입니다. 배포후에 다시 설계변경 할 수 있습니다.');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
*/
|
||
|
|
return _editable && cell.getData().PART_SEQ == 1 && 'deploy' == cell.getData().Q_STATUS;
|
||
|
|
}
|
||
|
|
|
||
|
|
//저장 시 중복여부를 확인한다.
|
||
|
|
function fn_overlapPartMng(){
|
||
|
|
var returnFlag = false;
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url:"/partMng/overlapPartMng.do",
|
||
|
|
type:"POST",
|
||
|
|
data:$("#form1").serialize(),
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
success:function(data){
|
||
|
|
if(0 < data.length){
|
||
|
|
Swal.fire("중복되는 품목이 존재합니다.\n품번 및 Revision을 확인하시기 바랍니다.");
|
||
|
|
returnFlag = false;
|
||
|
|
}else{
|
||
|
|
returnFlag = true;
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
return returnFlag;
|
||
|
|
}
|
||
|
|
|
||
|
|
function fn_save(){
|
||
|
|
//var CHANGE_OPTION_Arr = new Array();
|
||
|
|
// $('input:checkbox[name="CHANGE_OPTION"]').each(function() {
|
||
|
|
// if(this.checked){//checked 처리된 항목의 값
|
||
|
|
// CHANGE_OPTION_Arr.push(this.value);
|
||
|
|
// }
|
||
|
|
// });
|
||
|
|
// $("#CHANGE_OPTION_Arr").val(CHANGE_OPTION_Arr);
|
||
|
|
|
||
|
|
//이걸로는 fnc_validate에서 체크 안됨
|
||
|
|
$("select[name=CHANGE_TYPE]").attr("required", "required");
|
||
|
|
$("select[name=CHANGE_OPTION]").attr("required", "required");
|
||
|
|
|
||
|
|
if(fnc_validate('form1')){
|
||
|
|
//if(fn_overlapPartMng()){
|
||
|
|
|
||
|
|
var checkStatus = true;
|
||
|
|
var checkRequired = true;
|
||
|
|
var datas = _tabulGrid.getData();
|
||
|
|
|
||
|
|
datas.forEach(function (data) {
|
||
|
|
var Q_STATUS = fnc_checkNull(data.Q_STATUS);
|
||
|
|
var CHANGE_TYPE = fnc_checkNull(data.CHANGE_TYPE);
|
||
|
|
var CHANGE_OPTION = fnc_checkNull(data.CHANGE_OPTION);
|
||
|
|
//alert(CHANGE_TYPE + ":" + CHANGE_OPTION);
|
||
|
|
if('deploy' != Q_STATUS){
|
||
|
|
checkStatus = false;
|
||
|
|
}
|
||
|
|
if(fnc_isEmpty(CHANGE_TYPE) || fnc_isEmpty(CHANGE_OPTION)){
|
||
|
|
checkRequired = false;
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
if(!checkStatus){
|
||
|
|
Swal.fire('설변중인 파트입니다. 배포후에 다시 설계변경 할 수 있습니다.');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
if(!checkRequired){
|
||
|
|
Swal.fire('EO구분, EO사유는 필수 입력입니다.');
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
|
||
|
|
if(confirm("저장하시겠습니까?")){
|
||
|
|
|
||
|
|
var param = $("#form1").serializeObject();
|
||
|
|
param.dataListJson = JSON.stringify(_tabulGrid.getData());
|
||
|
|
|
||
|
|
$.ajax({
|
||
|
|
url:"/partMng/savePartMngChangeList.do",
|
||
|
|
type:"POST",
|
||
|
|
//data:$("#form1").serialize(),
|
||
|
|
data: param,
|
||
|
|
dataType:"json",
|
||
|
|
async:false,
|
||
|
|
success:function(data){
|
||
|
|
if(data.result == "DUPLICATE"){
|
||
|
|
alert(data.msg);
|
||
|
|
//$("#PART_NO").focus();
|
||
|
|
}else{
|
||
|
|
alert(data.msg);
|
||
|
|
fn_search();
|
||
|
|
}
|
||
|
|
},
|
||
|
|
error: function(jqxhr, status, error){
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
//}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
function openPartMngPopup(objId){
|
||
|
|
var popup_width = 600;
|
||
|
|
var popup_height = 500;
|
||
|
|
|
||
|
|
var hiddenForm = document.hiddenForm;
|
||
|
|
var url = "/partMng/partMngFormPopUp.do";
|
||
|
|
|
||
|
|
if("" != objId){
|
||
|
|
url = "/partMng/partMngDetailPopUp.do";
|
||
|
|
}
|
||
|
|
|
||
|
|
var target = "partMngPopUp";
|
||
|
|
|
||
|
|
fn_centerPopup(popup_width, popup_height, url, target);
|
||
|
|
|
||
|
|
hiddenForm.action = url;
|
||
|
|
hiddenForm.OBJID.value = objId;
|
||
|
|
hiddenForm.target = target;
|
||
|
|
hiddenForm.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
function fn_excel() {
|
||
|
|
document.form1.actionType.value = "excel";
|
||
|
|
document.form1.action = "/partMng/partMngList.do";
|
||
|
|
document.form1.submit();
|
||
|
|
}
|
||
|
|
|
||
|
|
</script>
|
||
|
|
</head>
|
||
|
|
<body class="backcolor">
|
||
|
|
<form name="hiddenForm" id="hiddenForm" method="post">
|
||
|
|
<input type="hidden" name="OBJID" id="OBJID">
|
||
|
|
</form>
|
||
|
|
<form name="form1" id="form1" method="post">
|
||
|
|
<input type="hidden" name="search" id="search" value="Y">
|
||
|
|
<input type="hidden" name="actionType" id="actionType">
|
||
|
|
<input type="hidden" name="ACTION_TYPE" id="ACTION_TYPE" value="changeDesign">
|
||
|
|
<div>
|
||
|
|
<div class="content-box">
|
||
|
|
<div class="content-box-s">
|
||
|
|
<div class="plm_menu_name_gdnsi">
|
||
|
|
<h2>
|
||
|
|
<span>제품관리_설변대상 PART조회</span>
|
||
|
|
</h2>
|
||
|
|
<div class="btnArea">
|
||
|
|
<!-- <input type="button" value="파일연결" class="plm_btns" id="btnConnectFile"> -->
|
||
|
|
<!-- <input type="button" value="등록" class="plm_btns" id="btnReg"> -->
|
||
|
|
<!--
|
||
|
|
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
|
||
|
|
<input type="button" value="Excel Download" class="plm_btns" id="btnExcel">
|
||
|
|
-->
|
||
|
|
<%--
|
||
|
|
<table>
|
||
|
|
<tr>
|
||
|
|
<td class="input_title" >
|
||
|
|
<label for="">설변구분</label>
|
||
|
|
</td>
|
||
|
|
<td class="input_sub_title" colspan="2">
|
||
|
|
<select name="CHANGE_TYPE" id="CHANGE_TYPE" class="select2" type="select" required reqTitle="설변구분"><option value="">선택</option>${code_map.CHANGE_TYPE}</select>
|
||
|
|
</td>
|
||
|
|
|
||
|
|
<td class="input_title">
|
||
|
|
<label for="">설변사유</label>
|
||
|
|
</td>
|
||
|
|
<td class="input_sub_title">
|
||
|
|
<select name="CHANGE_OPTION" id="CHANGE_OPTION" class="select2" type="select" required reqTitle="설변구분"><option value="">선택</option>${code_map.CHANGE_OPTION}</select>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<input type="button" value="저장" class="plm_btns" id="btnSave">
|
||
|
|
--%>
|
||
|
|
|
||
|
|
<input type="button" value="설계변경저장" class="plm_btns" id="btnChange">
|
||
|
|
<input type="button" value="조회" class="plm_btns" id="btnSearch">
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
<div id="plmSearchZon">
|
||
|
|
<table>
|
||
|
|
<tbody>
|
||
|
|
<tr>
|
||
|
|
<%-- <td><label for="product_code">기종(모델)명</label></td>
|
||
|
|
<td>
|
||
|
|
<select name="product_code" id="product_code" style="" class="select2" autocomplete="off">
|
||
|
|
<option value="">선택</option>
|
||
|
|
${code_map.product_code}
|
||
|
|
</select>
|
||
|
|
</td> --%>
|
||
|
|
<!-- <td><label for="">UPG_NO</label></td> -->
|
||
|
|
<!-- <td> -->
|
||
|
|
<!-- <select name="upg_no" id="upg_no" class="select2" style="width:250px;" autocomplete="off"></select> -->
|
||
|
|
<!-- </td> -->
|
||
|
|
<td><label for="project_name">프로젝트번호</label></td>
|
||
|
|
<td>
|
||
|
|
<select name="project_name" id="project_name" style="width:230px" class="select2" autocomplete="off" required type="select" reqTitle="프로젝트번호">
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td><label for="unit_code">유닛명</label></td>
|
||
|
|
<td>
|
||
|
|
<select name="unit_code" id="unit_code" style="width:260px" class="select2" autocomplete="off" required type="select" reqTitle="유닛명">
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
<td><label for="">품번</label></td>
|
||
|
|
<td>
|
||
|
|
<%--
|
||
|
|
<input type="text" name="SEARCH_PART_NO" id="SEARCH_PART_NO" style="width:194px;" autocomplete="off" value="${param.SEARCH_PART_NO}" required type="select" reqTitle="품번">
|
||
|
|
--%>
|
||
|
|
<select name="SEARCH_PART_OBJID" id="SEARCH_PART_OBJID" style="width:230px" class="select2" autocomplete="off" required type="select" reqTitle="품번">
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
|
||
|
|
<%--
|
||
|
|
<td><label for="">품명</label></td>
|
||
|
|
<td>
|
||
|
|
<input type="text" name="SEARCH_PART_NAME" id="SEARCH_PART_NAME" style="width:150px;" autocomplete="off" value="${param.SEARCH_PART_NAME}">
|
||
|
|
</td>
|
||
|
|
|
||
|
|
<td><label for="">Revision</label></td>
|
||
|
|
<td colspan="7">
|
||
|
|
<select name="SEARCH_REVISION_RELEASE" id="SEARCH_REVISION_RELEASE" style="width:150px;" autocomplete="off">
|
||
|
|
<option value="1">current</option>
|
||
|
|
<option value="0">all</option>
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
|
||
|
|
<td><label for="">재질</label></td>
|
||
|
|
<td>
|
||
|
|
<input type="text" name="SEARCH_MATERIAL" id="SEARCH_MATERIAL" style="width:150px;" autocomplete="off" value="${param.SEARCH_MATERIAL}">
|
||
|
|
</td>
|
||
|
|
<td><label for="">사양(규격)</label></td>
|
||
|
|
<td>
|
||
|
|
<input type="text" name="SEARCH_SPEC" id="SEARCH_SPEC" style="width:150px;" autocomplete="off" value="${param.SEARCH_SPEC}">
|
||
|
|
</td>
|
||
|
|
--%>
|
||
|
|
<!-- <td><label for="">EO No.</label></td> -->
|
||
|
|
<!-- <td> -->
|
||
|
|
<%-- <input type="text" name="SEARCH_EO" id="SEARCH_EO" style="width:150px;" autocomplete="off" value="${param.SEARCH_EO}"> --%>
|
||
|
|
<!-- </td> -->
|
||
|
|
|
||
|
|
<%-- <td><label for="">최초설계일</label></td>
|
||
|
|
<td>
|
||
|
|
<input type="text" name="SEARCH_DESIGN_DATE_FROM" id="SEARCH_DESIGN_DATE_FROM" style="width:90px;" autocomplete="off" value="${param.SEARCH_DESIGN_DATE_FROM}">~
|
||
|
|
<input type="text" name="SEARCH_DESIGN_DATE_TO" id="SEARCH_DESIGN_DATE_TO" style="width:90px;" autocomplete="off" value="${param.SEARCH_DESIGN_DATE_TO}">
|
||
|
|
</td>
|
||
|
|
<td><label for="">부품 유형</label></td>
|
||
|
|
<td>
|
||
|
|
<select name="SEARCH_PART_TYPE" id="SEARCH_PART_TYPE" style="width:150px;" autocomplete="off"></select>
|
||
|
|
</td>
|
||
|
|
--%>
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<%@include file= "/WEB-INF/view/common/common_gridArea.jsp" %>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</form>
|
||
|
|
</body>
|
||
|
|
</html>
|