387 lines
11 KiB
Plaintext
387 lines
11 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ 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>
|
|
<script>
|
|
$(document).ready(function(){
|
|
fn_setOEMList("${param.search_oemObjId}");
|
|
|
|
//검사명 setting
|
|
fn_setTestTypeList();
|
|
|
|
$("#search_oemObjId").change(function(){
|
|
fn_setCarTypeList($(this).val(),"${param.search_carObjId}");
|
|
});
|
|
|
|
//단계 change
|
|
$("#step1").change(function(){
|
|
fnc_setStep2($(this).val(), "${param.step2}");
|
|
});
|
|
|
|
//단계1 change trigger
|
|
$("#step1").trigger("change");
|
|
|
|
fn_getConnectedTestResultPartList();
|
|
|
|
$("#titleArea").empty();
|
|
if("${param.partType}" == "assy"){
|
|
$("#titleArea").append("품질이관 ASSY 대상지정");
|
|
}else if("${param.partType}" == "part"){
|
|
$("#titleArea").append("품질이관 단품 대상지정");
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
<script>
|
|
|
|
//검사명 목록 조회
|
|
function fn_setTestTypeList(){
|
|
|
|
$("#search_testTypeObjId").empty();
|
|
|
|
var appendCode = "";
|
|
|
|
$.ajax({
|
|
url:"/common/getTestTypeList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
success:function(data){
|
|
|
|
appendCode += "<option value=''>선택</option>";
|
|
if(data.length > 0){
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].TEST_TYPE_NAME+"</option>";
|
|
});
|
|
|
|
var dbVal = fnc_checkNull("${param.search_testTypeObjId}");
|
|
if(dbVal != ""){
|
|
$("#testTypeObjId > option[value="+dbVal+"]").attr("selected", "true");
|
|
}
|
|
}
|
|
$("#search_testTypeObjId").append(appendCode);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
|
|
//car 목록 조회
|
|
function fn_setCarTypeList(oemObjId,carObjId){
|
|
|
|
var appendCode = "";
|
|
|
|
$("#search_carObjId").empty();
|
|
|
|
if(null != oemObjId && "" != oemObjId){
|
|
$.ajax({
|
|
url:"/common/getCarTypeList.do",
|
|
type:"POST",
|
|
data:{"isJson":true, "search_oemObjId":oemObjId},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
appendCode += "<option value=''>선택</option>";
|
|
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].CAR_CODE+"("+data[i].CAR_NAME+")</option>";
|
|
});
|
|
$("#search_carObjId").append(appendCode);
|
|
$("#search_carObjId").val(carObjId);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}else{
|
|
appendCode += "<option value=''>선택</option>";
|
|
$("#carObjId").append(appendCode);
|
|
}
|
|
}
|
|
|
|
|
|
//oem 목록 조회
|
|
function fn_setOEMList(oemObjId){
|
|
$.ajax({
|
|
url:"/common/getOEMList.do",
|
|
type:"POST",
|
|
data:{"isJson":true},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var appendCode = "";
|
|
$("#search_oemObjId").empty();
|
|
appendCode += "<option value=''>선택</option>";
|
|
$.each(data, function(i){
|
|
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].OEM_NAME+"("+data[i].OEM_CODE+")</option>";
|
|
});
|
|
|
|
$("#search_oemObjId").append(appendCode);
|
|
$("#search_oemObjId").val(oemObjId);
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//차종 제품에 연결된 합부판정 Part의 목록을 가져온다.
|
|
function fn_getConnectedTestResultPartList(){
|
|
$("#connectedPartList").empty();
|
|
|
|
var appendCode = "";
|
|
|
|
$.ajax({
|
|
url:"/transfer/getConnectedTestResultPartList.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
if(data.length > 0){
|
|
$.each(data,function(i){
|
|
appendCode+="<tr>";
|
|
appendCode+=" <td><input type='checkbox' name='connectedPartObjId' value='"+data[i].OBJID+"' class='checkBox'></td>";
|
|
appendCode+=" <td>"+data[i].RNUM+"</td>";
|
|
appendCode+=" <td>"+data[i].PART_NO+"</td>";
|
|
appendCode+=" <td>"+data[i].PART_NAME+"</td>";
|
|
appendCode+="</tr>";
|
|
});
|
|
}else{
|
|
appendCode+="<tr>";
|
|
appendCode+=" <td align='center' colspan='4'>조회된 정보가 없습니다.</td>";
|
|
appendCode+="</tr>";
|
|
}
|
|
|
|
$("#connectedPartList").append(appendCode);
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//검색조건에 해당하는 합부판정 Part를 조회한다.
|
|
function fn_search(){
|
|
|
|
$("#partListArea").empty();
|
|
|
|
var appendCode = "";
|
|
|
|
$.ajax({
|
|
url:"/transfer/getTestResultPartList.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
var appendCode = "";
|
|
|
|
if(data.length > 0){
|
|
$.each(data,function(i){
|
|
appendCode+="<tr>";
|
|
appendCode+=" <input type='hidden' name='"+data[i].OBJID+"_partNo' value='"+fnc_checkNull(data[i].PART_NO)+"'>";
|
|
appendCode+=" <input type='hidden' name='"+data[i].OBJID+"_masterObjId' value='"+fnc_checkNull(data[i].QUALITY_MASTER_OBJID)+"'>";
|
|
appendCode+=" <input type='hidden' name='"+data[i].OBJID+"_slaveObjId' value='"+fnc_checkNull(data[i].QUALITY_SLAVE_OBJID)+"'>";
|
|
appendCode+=" <td><input type='checkbox' name='searchPartObjId' value='"+data[i].OBJID+"' class='checkBox'></td>";
|
|
appendCode+=" <td>"+data[i].RNUM+"</td>";
|
|
appendCode+=" <td>"+data[i].PART_NO+"</td>";
|
|
appendCode+=" <td>"+data[i].PART_NAME+"</td>";
|
|
appendCode+="</tr>";
|
|
});
|
|
}else{
|
|
appendCode+="<tr>";
|
|
appendCode+=" <td align='center' colspan='4'>조회된 정보가 없습니다.</td>";
|
|
appendCode+="</tr>";
|
|
}
|
|
|
|
$("#partListArea").append(appendCode);
|
|
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
|
|
//조회된 합부판정 Part를 연결한다.
|
|
function fn_connectTestResultPart(){
|
|
if(confirm("선택된 내용을 추가하시겠습니까?\n추가 시 바로 반영됩니다.")){
|
|
$.ajax({
|
|
url:"/transfer/connectTestResultPart.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(fnc_checkTrue(data.result)){
|
|
Swal.fire("처리되었습니다.");
|
|
fn_getConnectedTestResultPartList();
|
|
fn_search();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//조회된 합부판정 Part를 연결한다.
|
|
function fn_disConnectTestResultPart(){
|
|
|
|
if(confirm("선택된 내용을 삭제하시겠습니까?\n추가 시 바로 반영됩니다.")){
|
|
$.ajax({
|
|
url:"/transfer/disConnectTestResultPart.do",
|
|
type:"POST",
|
|
data:$("#form1").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(fnc_checkTrue(data.result)){
|
|
Swal.fire("처리되었습니다.");
|
|
fn_getConnectedTestResultPartList();
|
|
fn_search();
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" id="form1" action="" method="post">
|
|
<input type="hidden" name="targetObjId" id="targetObjId" value="${param.targetObjId}">
|
|
<input type="hidden" name="productObjId" id="productObjId" value="${param.productObjId}">
|
|
<input type="hidden" name="partType" id="partType" value="${param.partType}">
|
|
<div class="plm_menu_name" style="margin-bottom:20px;">
|
|
<h2>
|
|
<span id="titleArea"></span>
|
|
</h2>
|
|
</div>
|
|
<div style="width:1200px; margin: 0 auto;">
|
|
<div style="width:565px; margin: 0 auto; float:left;">
|
|
<div class="plm_table_wrap" style="width:530px; margin: 0 auto;">
|
|
<div id="" style="padding-top:40px; font-size:13px;">${partMasterMap.OEM_NAME}-${partMasterMap.CAR_NAME}-${partMasterMap.PRODUCT_GROUP_NAME}-${partMasterMap.PRODUCT_NAME} </div>
|
|
<div id="" style=".font-size:13px;"></div>
|
|
<div style="overflow-y:scroll;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="18%" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><input type="checkbox" name="allChk" id="allChk"></td>
|
|
<td>No</td>
|
|
<td>Part No.</td>
|
|
<td>Part Name</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="width:100%; height:350px;">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="5%"/>
|
|
<col width="5%"/>
|
|
<col width="18%"/>
|
|
<col width="*"/>
|
|
</colgroup>
|
|
<tbody id="connectedPartList"></tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div style="width:57px; margin: 0 auto; padding-top:250px;float:left;">
|
|
<input type="button" value="<<" class="blue_btn" id="moveLeft" onclick="fn_connectTestResultPart();">
|
|
<input type="button" value=">>" class="blue_btn" id="moveRight" onclick="fn_disConnectTestResultPart();">
|
|
</div>
|
|
<div id="structureTableWrap2" style="width:565px; float:right;">
|
|
<div class="searchIdName" style="width:95%; margin: 0 auto;">
|
|
<table>
|
|
<tr>
|
|
<td><label for="">고객사</label></td>
|
|
<td>
|
|
<select name="search_oemObjId" id="search_oemObjId"></select>
|
|
</td>
|
|
<td><label for="">차종</label></td>
|
|
<td>
|
|
<select name="search_carObjId" id="search_carObjId" style="width:150px;"></select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label for="">검사명</label></td>
|
|
<td>
|
|
<select name="search_testTypeObjId" id="search_testTypeObjId"></select>
|
|
</td>
|
|
<td><label for="">단계</label></td>
|
|
<td>
|
|
<select name="step1" id="step1" style="width:75px;margin:0px;">
|
|
<option value="">선택</option>
|
|
<option value="design">설계</option>
|
|
<option value="develop">개발</option>
|
|
<option value="production">양산</option>
|
|
</select>
|
|
<select name="step2" id="step2" style="width:75px;margin:0px;">
|
|
<option value="">전체</option>
|
|
</select>
|
|
<input type="button" value="조회" class="blue_btn" onclick="javascript:fn_search();">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="plm_table_wrap" style="width:95%; margin: 0 auto;">
|
|
<div style="overflow-y:scroll;">
|
|
<table class="plm_table" style="width:100%;">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="25%" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<thead>
|
|
<tr class="plm_thead">
|
|
<td><input type="checkbox" name="allChk" value="" id="allChk" class="checkBox"></td>
|
|
<td>No</td>
|
|
<td>Part No.</td>
|
|
<td>Part Name</td>
|
|
</tr>
|
|
</thead>
|
|
</table>
|
|
</div>
|
|
<div class="plm_scroll_table" style="height:350px; width:100%">
|
|
<table class="plm_table">
|
|
<colgroup>
|
|
<col width="5%" />
|
|
<col width="5%" />
|
|
<col width="25%" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<tbody id="partListArea">
|
|
<tr style="text-align:center;">
|
|
<td align="center" colspan="4">조회된 정보가 없습니다.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="btn_wrap" style="clear:both; top:35px;">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="닫기" id="btn_close" class="plm_btns" onclick="top.close();">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |