최초커밋
This commit is contained in:
@@ -0,0 +1,321 @@
|
||||
<%@ 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>
|
||||
</head>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("#btn_close").click(function(){
|
||||
self.close(0);
|
||||
});
|
||||
|
||||
fn_setOEMList("${param.search_oemObjId}");
|
||||
fn_setProductGroupList("${param.search_productGroupObjId}");
|
||||
|
||||
$("#search_oemObjId").change(function(){
|
||||
fn_setCarTypeList($(this).val(),"${param.search_carObjId}");
|
||||
});
|
||||
|
||||
$("#search_productGroupObjId").change(function(){
|
||||
fn_setProductList($(this).val(),"${param.search_productObjId}");
|
||||
})
|
||||
|
||||
if("${null != param.search_carObjId && '' != param.search_carObjId}"){
|
||||
fn_setCarTypeList("${param.search_oemObjId}","${param.search_carObjId}");
|
||||
}
|
||||
|
||||
if("${null != param.search_productGroupObjId && '' != param.search_productGroupObjId}"){
|
||||
fn_setProductList("${param.search_productGroupObjId}","${param.search_productObjId}");
|
||||
}
|
||||
|
||||
$("#allChk").click(function(){
|
||||
if($(this).prop("checked")){
|
||||
$("input[name=searchPartCheckbox]").prop("checked", true);
|
||||
}else{
|
||||
$("input[name=searchPartCheckbox]").prop("checked", false);
|
||||
}
|
||||
});
|
||||
|
||||
$("input[type=text]").keyup(function(e){
|
||||
if(e.keyCode == 13){
|
||||
fn_search();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
//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){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//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);
|
||||
}
|
||||
}
|
||||
|
||||
//제품군 조회
|
||||
function fn_setProductGroupList(productGroupObjId){
|
||||
$.ajax({
|
||||
url:"/common/getProductGroupList.do",
|
||||
type:"POST",
|
||||
data:{"isJson":true},
|
||||
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].PRODUCT_GROUP_NAME+"</option>";
|
||||
});
|
||||
|
||||
$("#search_productGroupObjId").append(appendCode);
|
||||
$("#search_productGroupObjId").trigger("change");
|
||||
$("#search_productGroupObjId").val(productGroupObjId);
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//제품 조회
|
||||
function fn_setProductList(productGroupObjId,productObjId){
|
||||
var productGroupObjId = $("#search_productGroupObjId").val();
|
||||
var appendCode = "";
|
||||
|
||||
$("#search_productObjId").empty();
|
||||
|
||||
if(null != productGroupObjId && "" != productGroupObjId){
|
||||
$.ajax({
|
||||
url:"/common/getProductList.do",
|
||||
type:"POST",
|
||||
data:{"isJson":true, "search_productGroupObjId":productGroupObjId},
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
appendCode += "<option value=''>선택("+data.length+"개)</option>";
|
||||
|
||||
$.each(data, function(i){
|
||||
appendCode += "<option value='"+data[i].OBJID+"'>"+data[i].PRODUCT_NAME+"</option>";
|
||||
});
|
||||
|
||||
$("#search_productObjId").children().remove();
|
||||
$("#search_productObjId").append(appendCode);
|
||||
$("#search_productObjId").val(productObjId);
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//검색조건에 해당하는 Part의 목록을 조회한다.
|
||||
function fn_search(){
|
||||
var partForm = $("#form1").serialize();
|
||||
$("#allChk").prop("checked", false);
|
||||
$.ajax({
|
||||
url:"/project/partMaster/getPartList.do",
|
||||
type:"POST",
|
||||
data:partForm,
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
|
||||
$("#partListArea").empty();
|
||||
|
||||
var appendCode = "";
|
||||
|
||||
if(0 < data.length){
|
||||
$.each(data, function(i){
|
||||
appendCode += "<tr>";
|
||||
appendCode += " <td><input type='checkbox' value="+data[i].PART_NO+" name='searchPartCheckbox'></td>";
|
||||
appendCode += " <td>"+data[i].RNUM+"</td>";
|
||||
appendCode += " <td title='"+data[i].PART_NO+"'><a href='#' onclick=\"fnc_openPartDetailPopup('${connectUserId}','"+data[i].PART_NO+"');\">"+data[i].PART_NO+"</a></td>";
|
||||
appendCode += " <td title='"+data[i].PART_NAME+"'><a href='#' onclick=\"fnc_openPartDetailPopup('${connectUserId}','"+data[i].PART_NO+"');\">"+data[i].PART_NAME+"</a></td>";
|
||||
appendCode += " <td title='"+data[i].MATERIAL_NAME+"'>"+data[i].MATERIAL_NAME+"</td>";
|
||||
appendCode += "</tr>";
|
||||
});
|
||||
}else{
|
||||
appendCode += "<tr>";
|
||||
appendCode += " <td colspan='5'>조회된 정보가 없습니다.</td>";
|
||||
appendCode += "</tr>";
|
||||
}
|
||||
$("#partListArea").append(appendCode);
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//선택된 Part를 Part Master와 연결한다.
|
||||
function fn_connectPart(){
|
||||
|
||||
var checkBoxLength = $("input:checkbox[name='searchPartCheckbox']:checked").length;
|
||||
|
||||
if(0 == checkBoxLength){
|
||||
Swal.fire("선택된 Part가 없습니다.");
|
||||
return false;
|
||||
}else{
|
||||
var partForm = $("#form1").serialize();
|
||||
|
||||
$.ajax({
|
||||
url:"/project/partMaster/partMasterConnectPart.do",
|
||||
type:"POST",
|
||||
data:partForm,
|
||||
dataType:"json",
|
||||
async:false,
|
||||
success:function(data){
|
||||
parent.addPartSearchPopUpLeft.fn_getConnectedPartList();
|
||||
fn_search();
|
||||
$("#allChk").prop("checked", false);
|
||||
},
|
||||
error: function(jqxhr, status, error){
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<body>
|
||||
<form name="form1" id="form1" action="" method="post">
|
||||
<input type="hidden" name="targetObjId" id="targetObjId" value="${param.objId}">
|
||||
<div id="structureTableWrap2">
|
||||
<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_productGroupObjId" id="search_productGroupObjId"></select>
|
||||
</td>
|
||||
<td><label for="">제품</label></td>
|
||||
<td>
|
||||
<select name="search_productObjId" id="search_productObjId" style="width:150px;">
|
||||
<option value="">전체</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">Part No</label></td>
|
||||
<td>
|
||||
<input type="text" name="search_partNo" id="search_partNo" style="width:177px; height:18px;">
|
||||
</td>
|
||||
<td><label for="">Part Name</label></td>
|
||||
<td>
|
||||
<input type="text" name="search_partName" id="search_partName" style="width:150px; height:18px;"> <input type="button" value="조회" class="blue_btn" onclick="fn_search();">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><label for="">단품 검색</label></td>
|
||||
<td>
|
||||
<input type="checkbox" name="search_singleProduct" id="search_singleProduct">
|
||||
</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="*" />
|
||||
<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>
|
||||
<td>재질</td>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
<div class="plm_scroll_table" style="height:555px; width:100%">
|
||||
<table class="plm_table">
|
||||
<colgroup>
|
||||
<col width="5%" />
|
||||
<col width="5%" />
|
||||
<col width="25%" />
|
||||
<col width="*" />
|
||||
<col width="*" />
|
||||
</colgroup>
|
||||
<tbody id="partListArea">
|
||||
<tr style="text-align:center;">
|
||||
<td align="center" colspan="5">조회된 정보가 없습니다.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user