188 lines
6.6 KiB
Plaintext
188 lines
6.6 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>
|
|
$(function(){
|
|
$(document).ready(function(){
|
|
//제품군에 따른 제품을 불러옴
|
|
$("#search_productGroupObjId").change(function(){
|
|
$.ajax({
|
|
|
|
url : "/specData/getProductList.do",
|
|
type:"POST",
|
|
data:{"productGroupObjid":$(this).val(),"isJson":true},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
//Swal.fire(data.length);
|
|
$(".dataOptions1").remove();
|
|
$.each(data, function(i){
|
|
$("#search_productObjId").append("<option value=\""+data[i].OBJID+"\" class=\"dataOptions1\">"+data[i].PRODUCT_NAME+"</option>");
|
|
});
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
/* Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText); */
|
|
}
|
|
});
|
|
});
|
|
|
|
//고객사에 따른 차명 목록을 불러옴
|
|
$("#search_oemObjId").change(function(){
|
|
$.ajax({
|
|
url : "/specData/getCarList.do",
|
|
type:"POST",
|
|
data:{"oemGroupObjid":$(this).val(),"isJson":true},
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
//Swal.fire(data.length);
|
|
$(".dataOptions2").remove();
|
|
$.each(data, function(i){
|
|
$("#search_carObjId").append("<option value=\""+data[i].OBJID+"\" class=\"dataOptions2\">"+data[i].CAR_NAME+"</option>");
|
|
});
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
});
|
|
|
|
$("#btnConfirm").click(function(){
|
|
if(fn_check()){
|
|
var search_oemObjId = $("#search_oemObjId").val();
|
|
var search_carObjId = $("#search_carObjId").val();
|
|
var search_productGroupObjId = $("#search_productGroupObjId").val();
|
|
var search_productObjId = $("#search_productObjId").val();
|
|
var search_regionObjId = $("#search_regionObjId").val();
|
|
|
|
//Swal.fire("car : "+search_carObjId+", productGroup : "+search_productGroupObjId+", product : "+search_productObjId+", region : "+search_regionObjId);
|
|
|
|
if(confirm("진행하시겠습니까?")){
|
|
window.resizeTo(1200, 930);
|
|
document.form1.action = "/part/setStructurePopupMainFS.do";
|
|
document.form1.submit();
|
|
}
|
|
}
|
|
});
|
|
|
|
$("#btnClose").click(function(){
|
|
self.close(0);
|
|
});
|
|
});
|
|
});
|
|
|
|
|
|
function fn_check(){
|
|
var carType = $("#search_carObjId option:checked").val();
|
|
var productGroup = $("#search_productGroupObjId option:checked").val();
|
|
var product = $("#search_productObjId option:checked").val();
|
|
var region = $("#search_regionObjId option:checked").val();
|
|
|
|
if(carType == null || carType == ""){
|
|
Swal.fire("차명을 선택해 주시기 바랍니다.");
|
|
$("#search_carObjId").focus();
|
|
return false;
|
|
}
|
|
if(productGroup == null || productGroup == ""){
|
|
Swal.fire("제품군을 선택해 주시기 바랍니다.");
|
|
$("#search_productGroupObjId").focus();
|
|
return false;
|
|
}
|
|
if(product == null || product == ""){
|
|
Swal.fire("제품을 선택해 주시기 바랍니다.");
|
|
$("#search_productObjId").focus();
|
|
return false;
|
|
}
|
|
if(region == null || region == ""){
|
|
Swal.fire("사양을 선택해 주시기 바랍니다.");
|
|
$("#search_regionObjId").focus();
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="backcolor">
|
|
<form name="form1" action="" method="post">
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>구조등록</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%;">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">고객사</label></td>
|
|
<td>
|
|
<select name="search_oemObjId" id="search_oemObjId">
|
|
<option value="">선택</option>
|
|
<c:forEach var="item" items="${oemTypeList}" varStatus="status">
|
|
<option value="${item.OBJID}">${item.OEM_NAME}(${item.OEM_CODE})</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">차명</label></td>
|
|
<td>
|
|
<select name="search_carObjId" id="search_carObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">제품군</label></td>
|
|
<td>
|
|
<select name="search_productGroupObjId" id="search_productGroupObjId">
|
|
<option value="">선택</option>
|
|
<c:forEach var="item" items="${productGroupList}" varStatus="status">
|
|
<option value="${item.OBJID}">${item.PRODUCT_GROUP_NAME}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">제품</label></td>
|
|
<td>
|
|
<select name="search_productObjId" id="search_productObjId">
|
|
<option value="">선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">사양</label></td>
|
|
<td>
|
|
<select name="search_regionObjId" id="search_regionObjId">
|
|
<option value="">선택</option>
|
|
<c:forEach var="item" items="${regionList}" varStatus="status">
|
|
<option value="${item.OBJID}">${item.REGION_NAME}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<div class="btn_wrap" style="clear:both;">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="등록" class="plm_btns" id="btnConfirm">
|
|
<input type="button" value="닫기" class="plm_btns" id="btnClose">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</body>
|
|
</html> |