240 lines
6.6 KiB
Plaintext
240 lines
6.6 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>
|
|
|
|
<c:set var="now" value="<%=new java.util.Date() %>"/>
|
|
<c:set var="sysYear"><fmt:formatDate value="${now}" pattern="yyyy" /></c:set>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#btn_close").click(function(){
|
|
self.close();
|
|
opener.fn_search();
|
|
});
|
|
});
|
|
function saveOEMInfo(){
|
|
var oemForm = document.oemForm;
|
|
$("#ordinary_hourly_wage").val($("#ordinary_hourly_wage").val().replace(/,/gi,""));
|
|
|
|
if(confirm("저장하시겠습니까?")){
|
|
$.ajax({
|
|
url:"/admin/saveratecalMgmtInfo.do",
|
|
type:"POST",
|
|
data:$("#oemForm").serialize(),
|
|
dataType:"json",
|
|
async:true,
|
|
success:function(data){
|
|
if(data.result!=''){
|
|
Swal.fire('저장되었습니다');
|
|
}
|
|
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("마일스톤이 저장되었습니다.")
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//코드값을 받아와서 동적으로 selectbox 생성
|
|
function optionwriteGroup(code){
|
|
var val=code;
|
|
var params = "";
|
|
var option="";
|
|
var combobox = $("#sol_userid");
|
|
combobox.empty();
|
|
if(val!=""){
|
|
params += "codeId="+val;
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/projectConcept/makewrite.do",
|
|
data : params,
|
|
dataType:"json",
|
|
async: false,
|
|
success: function(data){
|
|
if(data.RESULT !=""){
|
|
option += "<option value=''>선택</option>";
|
|
option += data.RESULT;
|
|
combobox.append(option);
|
|
}
|
|
}
|
|
});
|
|
if("${info.SOL_USERID}" != null){
|
|
$("#sol_userid").val("${info.SOL_USERID}");
|
|
}
|
|
// Swal.fire(Number(lev-1));
|
|
//$("#code"+Number(lev-1)).val(code).prop("selected", true);
|
|
}else{
|
|
|
|
option += "<option value=''>선택</option>";
|
|
combobox.append(option);
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="oemForm" id="oemForm" action="" method="post">
|
|
<input type="hidden" name="objid" id="objid" value="${Info.RATECAL_MGMT_OBJID}">
|
|
<section id="commonSection" class="admin_min">
|
|
<div class="admin_title">
|
|
<h2>임율마스터 등록/수정</h2>
|
|
</div>
|
|
<div id="adminPopupFormWrap">
|
|
<table id="adminPopupForm">
|
|
<colgroup>
|
|
<col width="30%">
|
|
<col width="*">
|
|
</colgroup>
|
|
<tbody>
|
|
<%-- <tr>
|
|
<td><label for="">직급</label></td>
|
|
<td>
|
|
<input type="text" name="position" id="position" value="${Info.POSITION}" maxlength="20">
|
|
</td>
|
|
</tr> --%>
|
|
<%-- <tr>
|
|
<td><label for="">이름</label></td>
|
|
<td>
|
|
<input type="text" name="user_name" id="user_name" value="${Info.USER_NAME}" maxlength="20">
|
|
</td> --%>
|
|
<tr>
|
|
<td><label for="">적용년도</label></td>
|
|
<td>
|
|
<select name="yyyy" id="yyyy">
|
|
<option value="">선택</option>
|
|
<c:forEach begin="${sysYear-4}" end="${sysYear}" var="req_year">
|
|
<option value="${req_year}"${Info.YYYY eq req_year ? 'selected':'' }>${req_year}</option>
|
|
</c:forEach>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<label for="">명칭</label>
|
|
</td>
|
|
<td>
|
|
<input type="text" name="user_id" id="user_id" value="${Info.USER_ID}" maxlength="100">
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td><label for="">단가</label></td>
|
|
<td>
|
|
<input type="text" name="ordinary_hourly_wage" id="ordinary_hourly_wage" value="${Info.ORDINARY_HOURLY_WAGE}" maxlength="20">
|
|
</td>
|
|
</tr>
|
|
<%-- <tr>
|
|
<td><label for="">일단가</label></td>
|
|
<td>
|
|
<input type="text" name="daily_wage" id="daily_wage" value="${Info.DAILY_WAGE}" maxlength="20" readonly>
|
|
</td>
|
|
</tr> --%>
|
|
<%--
|
|
|
|
<tr>
|
|
<td><label for="">비고</label></td>
|
|
<td>
|
|
<input type="text" name="reason" id="reason" value="${Info.REASON}" maxlength="20">
|
|
</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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="btnCenterWrap">
|
|
<center class="center_btns_wrap">
|
|
<input type="button" value="저장" class="btns" onclick="javascript:saveOEMInfo();">
|
|
<input type="button" value="닫기" name="" id="btn_close" class="btns" onclick="javascript:self.close();">
|
|
</center>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html> |