239 lines
6.9 KiB
Plaintext
239 lines
6.9 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" %>
|
|
<%
|
|
ArrayList list = (ArrayList)request.getAttribute("LIST");
|
|
%>
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title><%=Constants.SYSTEM_NAME%></title>
|
|
|
|
<!-- JSTL 변수선언 -->
|
|
<c:set var="totalCount" value="${empty TOTAL_COUNT?0:TOTAL_COUNT}" />
|
|
<c:set var="maxPage" value="${empty MAX_PAGE_SIZE?1:MAX_PAGE_SIZE}" />
|
|
<c:set var="nPage" value="${empty param.page?1:param.page}" />
|
|
<c:set var="pageIndex" value="${(nPage-1)/10}" />
|
|
<c:set var="nextPage" value="${empty NEXT_PAGE?1:NEXT_PAGE}" />
|
|
<c:set var="prevPage" value="${empty PREV_PAGE?1:PREV_PAGE}" />
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$(document).ready(function(){
|
|
fnc_datepick();
|
|
});
|
|
|
|
// 엔터키로 조회
|
|
$("input").keyup(function(e){
|
|
if(e.keyCode == 13){
|
|
document.form1.page.value = "1";
|
|
fn_search();
|
|
}
|
|
});
|
|
|
|
// 조회
|
|
$("#btnSearch").click(function(){
|
|
document.form1.page.value = "1";
|
|
fn_search();
|
|
});
|
|
|
|
// ERP 계정과목 동기화
|
|
$("#btnSyncErp").click(function(){
|
|
fn_syncErp();
|
|
});
|
|
});
|
|
|
|
// 조회
|
|
function fn_search(){
|
|
document.form1.action = "/admin/acctCodeList.do";
|
|
document.form1.submit();
|
|
}
|
|
|
|
// ERP 계정과목 동기화
|
|
function fn_syncErp(){
|
|
if(confirm("ERP 시스템의 계정과목 정보를 동기화하시겠습니까?")){
|
|
Swal.fire({
|
|
title: '동기화 중...',
|
|
text: 'ERP 계정과목 데이터를 가져오는 중입니다. 잠시만 기다려주세요.',
|
|
allowOutsideClick: false,
|
|
didOpen: () => {
|
|
Swal.showLoading();
|
|
}
|
|
});
|
|
|
|
$.ajax({
|
|
type : "POST",
|
|
url : "/admin/syncAccountCodeDataManual.do",
|
|
dataType:"json",
|
|
success:function(data){
|
|
Swal.close();
|
|
if(data.success){
|
|
Swal.fire({
|
|
icon: 'success',
|
|
title: '동기화 완료',
|
|
text: data.message
|
|
}).then(function(){
|
|
fn_search();
|
|
});
|
|
} else {
|
|
Swal.fire({
|
|
icon: 'error',
|
|
title: '동기화 실패',
|
|
text: data.message
|
|
});
|
|
}
|
|
},
|
|
error: function(jqxhr, status, error){
|
|
Swal.close();
|
|
Swal.fire({
|
|
icon: 'error',
|
|
title: '오류 발생',
|
|
text: '배치 실행 중 오류가 발생했습니다.'
|
|
});
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form name="form1" method="POST">
|
|
<input type="hidden" name="actionType" id="actionType" value="" />
|
|
<section id="commonSection" class="admin1">
|
|
<div class="admin_title">
|
|
<h2>계정과목 관리</h2>
|
|
</div>
|
|
<div id="adminFormWrap">
|
|
<table id="adminForm">
|
|
<tbody>
|
|
<tr>
|
|
<td class="label"><label>계정코드</label></td>
|
|
<td><input type="text" id="search_acctCd" name="search_acctCd" value="${param.search_acctCd}" maxlength="8"></td>
|
|
<td class="label"><label>계정과목명</label></td>
|
|
<td><input type="text" id="search_acctNm" name="search_acctNm" value="${param.search_acctNm}" maxlength="40"></td>
|
|
<td class="label"><label>세목여부</label></td>
|
|
<td>
|
|
<select id="search_chFg" name="search_chFg">
|
|
<option value="">전체</option>
|
|
<option value="0" ${param.search_chFg eq '0' ? 'selected' : ''}>과목</option>
|
|
<option value="1" ${param.search_chFg eq '1' ? 'selected' : ''}>세목</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="adminBtnWrap">
|
|
<input type="button" value="조회" class="btns" id="btnSearch">
|
|
<input type="button" value="ERP 계정과목 동기화" class="btns" id="btnSyncErp" style="background-color:#4CAF50;color:white;">
|
|
</div>
|
|
<div id="adminTableWrap">
|
|
<div id="tableWrap">
|
|
<table id="adminTable">
|
|
<colgroup>
|
|
<col width="4%" />
|
|
<col width="8%" />
|
|
<col width="15%" />
|
|
<col width="6%" />
|
|
<col width="6%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="8%" />
|
|
<col width="10%" />
|
|
<col width="10%" />
|
|
<col width="8%" />
|
|
</colgroup>
|
|
<tr id="thead">
|
|
<td>No</td>
|
|
<td>계정코드</td>
|
|
<td>계정과목명</td>
|
|
<td>차대구분</td>
|
|
<td>세목여부</td>
|
|
<td>연동항목</td>
|
|
<td>그룹코드</td>
|
|
<td>그룹명</td>
|
|
<td>증빙구분</td>
|
|
<td>관련계정</td>
|
|
<td>관련계정명</td>
|
|
</tr>
|
|
<c:choose>
|
|
<c:when test="${!empty LIST}">
|
|
<c:forEach var="info" items="${LIST}" varStatus="status">
|
|
<tr>
|
|
<td>${info.RNUM}</td>
|
|
<td>${info.ACCT_CD}</td>
|
|
<td style="text-align:left; padding-left:5px;">${info.ACCT_NM}</td>
|
|
<td>${info.DRCR_FG_NM}</td>
|
|
<td>${info.CH_FG_NM}</td>
|
|
<td>${info.SUB_DISP_NM}</td>
|
|
<td>${info.GROUP_CD}</td>
|
|
<td>${info.GROUP_NM}</td>
|
|
<td>${info.ATTR_FG_NM}</td>
|
|
<td>${info.RACCT_CD}</td>
|
|
<td>${info.RACCT_NM}</td>
|
|
</tr>
|
|
</c:forEach>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td align="center" colspan="11">조회된 정보가 없습니다.</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="pdm_page">
|
|
<input type="hidden" name="page" id="page" value="${nPage}">
|
|
<c:if test="${!empty LIST}">
|
|
<div class="page_pro">
|
|
<center>
|
|
<table>
|
|
<tr>
|
|
<c:choose>
|
|
<c:when test="${nPage > 1}">
|
|
<td><a href="javascript:fnc_goPrev('${prevPage}');">prev</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">prev</td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
<c:forEach var="v" begin="${nPage>5?nPage-5:1}" end="${nPage>5?nPage+4:10}" step="1" varStatus="status">
|
|
<c:if test="${status.index -1 < maxPage}">
|
|
<c:choose>
|
|
<c:when test="${status.index eq nPage}">
|
|
<td><a href="#" class="now_page">${nPage}</a></td>
|
|
<td> </td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
|
|
<td> </td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</c:if>
|
|
</c:forEach>
|
|
<c:choose>
|
|
<c:when test="${nPage < maxPage}">
|
|
<td><a href="javascript:fnc_goNext('${nextPage}');">next</a></td>
|
|
</c:when>
|
|
<c:otherwise>
|
|
<td class="no_more_page">next</td>
|
|
</c:otherwise>
|
|
</c:choose>
|
|
</tr>
|
|
</table>
|
|
<p id="adminPageCount">총 ${totalCount}건</p>
|
|
</center>
|
|
</div>
|
|
</c:if>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
</body>
|
|
</html>
|