261 lines
8.3 KiB
Plaintext
261 lines
8.3 KiB
Plaintext
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
<%@ page import="com.pms.common.utils.*"%>
|
|
<%@ page import="java.util.*" %>
|
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
|
<%@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(){
|
|
$('.select2').select2();
|
|
|
|
$("#btn_close").click(function(){
|
|
self.close();
|
|
opener.fn_search();
|
|
});
|
|
});
|
|
function saveOEMInfo(){
|
|
if(fnc_valitate("oemForm")){
|
|
|
|
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:"/contractMgmt/saveSupMgmtInfo.do",
|
|
type:"POST",
|
|
data:$("#oemForm").serialize(),
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
if(data.result!=''){
|
|
alert('저장되었습니다');
|
|
}
|
|
opener.fn_search();
|
|
self.close();
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
}
|
|
});
|
|
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//전체 체크 기능
|
|
function allCheck(base,name){
|
|
var checkObj = document.getElementsByName(name);
|
|
var checkFlag = base.checked;
|
|
|
|
if(0 < checkObj.length){
|
|
for(var i=0;i<checkObj.length;i++){
|
|
checkObj[i].checked = checkFlag;
|
|
}
|
|
}else{
|
|
checkObj.checked = checkFlag;
|
|
}
|
|
}
|
|
|
|
function duplicateCheck(){
|
|
var result = false;
|
|
|
|
var url = "/admin/checkSameOEMCodeAndName.do";
|
|
var oemName = $("#oemName").val();
|
|
var oemCode = $("#oemCode").val();
|
|
|
|
$.ajax({
|
|
url:url,
|
|
type:"POST",
|
|
data:{"oemName":oemName,"oemCode":oemCode,"objId":$("#oemObjid").val()},
|
|
dataType:"json",
|
|
async:false,
|
|
success:function(data){
|
|
var codeCnt = data.SAME_OEM_CODE_CNT;
|
|
var nameCnt = data.SAME_OEM_NAME_CNT;
|
|
|
|
if(codeCnt > 0){
|
|
Swal.fire("고객사 코드가 이미 존재합니다.");
|
|
result = true;
|
|
return true;
|
|
}
|
|
if(nameCnt > 0){
|
|
Swal.fire("고객사명이 이미 존재합니다.");
|
|
result = true;
|
|
return true;
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.fire(jqxhr.statusText + ", " + status + ", " + error);
|
|
Swal.fire(jqxhr.status);
|
|
Swal.fire(jqxhr.responseText);
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
|
|
//milestone 정보를 수정한다.
|
|
function modifyMilestoneInfo(){
|
|
if(confirm("변경된 일정정보를 저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/admin/modifyOEMMilestoneInfo.do",
|
|
type:"POST",
|
|
data:$("#oemForm").serialize(),
|
|
dataType:"json",
|
|
success:function(data){
|
|
if(data.result == "true"){
|
|
getOemMileStoneList();
|
|
Swal.fire("마일스톤이 저장되었습니다.")
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="oemForm" id="oemForm" action="" method="post">
|
|
<input type="hidden" name="objid" id="objid" value="${Info.OBJID}">
|
|
|
|
<section>
|
|
<div class="plm_menu_name">
|
|
<h2>
|
|
<span>영업관리_고객 등록/수정</span>
|
|
</h2>
|
|
</div>
|
|
<div id="businessPopupFormWrap">
|
|
<h4><span>고객정보</span></h4>
|
|
<table class="pmsPopupForm">
|
|
<colgroup>
|
|
<col width="15%">
|
|
<col width="35%">
|
|
<col width="15%">
|
|
<col width="35%">
|
|
</colgroup>
|
|
<tr>
|
|
<td class="input_title"><label for="">구분</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="supply_code" id="supply_code" style="" required reqTitle="구분" type="select" class="select2" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.supply_code}
|
|
</select>
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">고객사명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_name" id="supply_name" value="${Info.SUPPLY_NAME}" required reqTitle="상호명" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">지역</label></td>
|
|
<td class="input_sub_title">
|
|
<select name="area_cd" id="area_cd" style="" class="select2" required reqTitle="지역" type="select" autocomplete="off">
|
|
<option value="">선택</option>
|
|
${code_map.area_cd}
|
|
</select>
|
|
</td>
|
|
<td class="input_title"><label for="">대표자명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="charge_user_name" id="charge_user_name" value="${Info.CHARGE_USER_NAME}" required reqTitle="대표자명" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="input_title"><label for="">실사용자명</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="reg_id" id="reg_id" value="${Info.REG_ID}" required reqTitle="실사용자명" maxlength="100">
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">사업자등록번호</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="bus_reg_no" id="bus_reg_no" value="${Info.BUS_REG_NO}" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td class="input_title"><label for="">법인/주민번호</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="reg_no" id="reg_no" value="${Info.REG_NO2}" maxlength="100">
|
|
</td>
|
|
<td class="input_title"><label for="">업태</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_busname" id="supply_busname" value="${Info.SUPPLY_BUSNAME}" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">업종</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_stockname" id="supply_stockname" value="${Info.SUPPLY_STOCKNAME}" maxlength="100">
|
|
</td>
|
|
<td class="input_title"><label for="">주소</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_address" id="supply_address" maxlength="100" value="${Info.SUPPLY_ADDRESS}" />
|
|
</td>
|
|
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="input_title"><label for="">핸드폰</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_tel_no" id="supply_tel_no" value="${Info.SUPPLY_TEL_NO}" maxlength="100">
|
|
</td>
|
|
|
|
<td class="input_title"><label for="">E-MAIL</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="email" id="email" value="${Info.EMAIL}" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="input_title"><label for="">OFFICE NO</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="office_no" id="office_no" value="${Info.OFFICE_NO}" maxlength="100">
|
|
</td>
|
|
|
|
|
|
<td class="input_title"><label for="">FAX NO</label></td>
|
|
<td class="input_sub_title">
|
|
<input type="text" name="supply_fax_no" id="supply_fax_no" value="${Info.SUPPLY_FAX_NO}" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
|
|
<%-- <tr>
|
|
<td><label for="">상태(활성화 여부)</label></td>
|
|
<td>
|
|
<select name="status" id="status">
|
|
<option value="">선택</option>
|
|
<option value="active" ${Info.STATUS eq 'active' ? 'selected' : ''}>활성화</option>
|
|
<option value="inActive" ${Info.STATUS eq 'inActive' ? 'selected' : ''}>비활성화</option>
|
|
</select>
|
|
</td>
|
|
</tr> --%>
|
|
</table>
|
|
</div>
|
|
<div class="btn_wrap">
|
|
<div class="plm_btn_wrap_center">
|
|
<input type="button" value="저장" class="plm_btns" onclick="javascript:saveOEMInfo();">
|
|
<input type="button" value="닫기" name="" id="btn_close" class="plm_btns" onclick="javascript:self.close();">
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |