Merge pull request 'V2025111703' (#70) from V2025111703 into main

Reviewed-on: #70
This commit was merged in pull request #70.
This commit is contained in:
2025-11-20 08:03:16 +00:00
14 changed files with 2665 additions and 28 deletions

View File

@@ -8525,4 +8525,251 @@ FROM (
ORDER BY V.PATH
</select>
<!-- 11월 19일 추가한 창고관리 매퍼 -->
<select id="getWarehouseList" parameterType="map" resultType="map">
SELECT
ROW_NUMBER() OVER (ORDER BY LOCATION_CODE) AS RNUM,
OBJID,
LOCATION_CODE,
LOCATION_NAME,
LOCATION_DESCRIPTION,
OUT_CODE,
OUT_CO_NAME,
FIT_STATUS,
AVAILABLE_STATUS,
USE_STATUS,
BASE_LOC_CD,
CO_CD,
LOC_NMK,
INSERT_ID,
INSERT_IP,
TO_CHAR(INSERT_DT, 'YYYY-MM-DD HH24:MI:SS') AS INSERT_DT,
MODIFY_ID,
MODIFY_IP,
TO_CHAR(MODIFY_DT, 'YYYY-MM-DD HH24:MI:SS') AS MODIFY_DT,
ATTR_NMK,
WRITER,
TO_CHAR(REGDATE, 'YYYY-MM-DD') AS REGDATE,
STATUS
FROM
WAREHOUSE_LOCATION
WHERE 1=1
<if test="searchLocationCode != null and searchLocationCode != ''">
AND UPPER(LOCATION_CODE) LIKE UPPER('%${searchLocationCode}%')
</if>
<if test="searchLocationName != null and searchLocationName != ''">
AND UPPER(LOCATION_NAME) LIKE UPPER('%${searchLocationName}%')
</if>
ORDER BY LOCATION_CODE
</select>
<select id="getWarehouseListInfo" parameterType="map" resultType="map">
SELECT
OBJID,
LOCATION_CODE,
LOCATION_NAME,
LOCATION_DESCRIPTION,
OUT_CODE,
OUT_CO_NAME,
FIT_STATUS,
AVAILABLE_STATUS,
USE_STATUS,
BASE_LOC_CD,
CO_CD,
LOC_NMK,
INSERT_ID,
INSERT_IP,
TO_CHAR(INSERT_DT, 'YYYY-MM-DD HH24:MI:SS') AS INSERT_DT,
MODIFY_ID,
MODIFY_IP,
TO_CHAR(MODIFY_DT, 'YYYY-MM-DD HH24:MI:SS') AS MODIFY_DT,
ATTR_NMK,
WRITER,
TO_CHAR(REGDATE, 'YYYY-MM-DD') AS REGDATE,
STATUS
FROM
WAREHOUSE_LOCATION
WHERE
OBJID = #{OBJID}::numeric
</select>
<select id="getDuplicateWarehouseListInfo" parameterType="map" resultType="map">
SELECT
*
FROM
WAREHOUSE_LOCATION T
WHERE 1=1
<if test="objid != null and objid != ''">
AND OBJID != #{objid}::numeric
</if>
<if test="location_code != null and location_code != ''">
AND TRIM(UPPER(LOCATION_CODE)) = TRIM(UPPER(#{location_code}))
</if>
</select>
<update id="mergewarehouseListInfo" parameterType="map">
INSERT INTO WAREHOUSE_LOCATION
(
OBJID,
LOCATION_CODE,
LOCATION_NAME,
LOCATION_DESCRIPTION,
OUT_CODE,
OUT_CO_NAME,
FIT_STATUS,
AVAILABLE_STATUS,
USE_STATUS,
BASE_LOC_CD,
CO_CD,
LOC_NMK,
INSERT_ID,
INSERT_IP,
INSERT_DT,
MODIFY_ID,
MODIFY_IP,
MODIFY_DT,
ATTR_NMK,
WRITER,
REGDATE,
STATUS
)
VALUES
(
#{objid}::numeric,
#{location_code},
#{location_name},
#{location_description},
#{out_code},
#{out_co_name},
#{fit_status},
#{available_status},
COALESCE(#{use_status}, 'Y'),
#{base_loc_cd},
#{co_cd},
#{loc_nmk},
#{insert_id},
#{insert_ip},
CASE WHEN #{insert_dt} = '' THEN NOW() ELSE COALESCE(#{insert_dt}::timestamp, NOW()) END,
#{modify_id},
#{modify_ip},
CASE WHEN #{modify_dt} = '' THEN NULL ELSE #{modify_dt}::timestamp END,
#{attr_nmk},
#{writer},
NOW(),
COALESCE(#{status}, 'ACTIVE')
)
ON CONFLICT (OBJID) DO UPDATE
SET
LOCATION_CODE = #{location_code},
LOCATION_NAME = #{location_name},
LOCATION_DESCRIPTION = #{location_description},
OUT_CODE = #{out_code},
OUT_CO_NAME = #{out_co_name},
FIT_STATUS = #{fit_status},
AVAILABLE_STATUS = #{available_status},
USE_STATUS = #{use_status},
BASE_LOC_CD = #{base_loc_cd},
CO_CD = #{co_cd},
LOC_NMK = #{loc_nmk},
MODIFY_ID = #{modify_id},
MODIFY_IP = #{modify_ip},
MODIFY_DT = CASE WHEN #{modify_dt} = '' THEN NOW() ELSE COALESCE(#{modify_dt}::timestamp, NOW()) END,
ATTR_NMK = #{attr_nmk},
STATUS = #{status}
</update>
<insert id="insertwarehouseListHistory" parameterType="map">
INSERT INTO WAREHOUSE_LOCATION_HISTORY
SELECT
#{objid}::numeric,
#{targetObjid}::numeric,
LOCATION_CODE,
LOCATION_NAME,
LOCATION_DESCRIPTION,
OUT_CODE,
OUT_CO_NAME,
FIT_STATUS,
AVAILABLE_STATUS,
USE_STATUS,
BASE_LOC_CD,
CO_CD,
LOC_NMK,
INSERT_ID,
INSERT_IP,
INSERT_DT,
MODIFY_ID,
MODIFY_IP,
MODIFY_DT,
ATTR_NMK,
#{writer},
NOW(),
STATUS
FROM
WAREHOUSE_LOCATION
WHERE
OBJID = #{targetObjid}::numeric
</insert>
<select id="warehouseHistoryList" parameterType="map" resultType="map">
SELECT
A.*
FROM (
SELECT
A.*,
ROW_NUMBER() OVER (ORDER BY RM DESC) AS RNUM
FROM (
SELECT
T.*,
ROW_NUMBER() OVER (ORDER BY REGDATE) AS RM,
(SELECT USER_NAME FROM USER_INFO UI WHERE T.WRITER = UI.USER_ID) AS WRITER_NAME,
TO_CHAR(T.REGDATE, 'YYYY-MM-DD HH24:MI:SS') AS REGDATE_TITLE
FROM
WAREHOUSE_LOCATION_HISTORY T
WHERE
TARGET_OBJID = #{objId}::numeric
) A
WHERE 1=1
) A
WHERE 1=1
AND <![CDATA[ A.RNUM::integer <= #{PAGE_END}::integer ]]>
AND <![CDATA[ A.RNUM::integer >= #{PAGE_START}::integer ]]>
</select>
<delete id="deleteWarehouse" parameterType="map">
DELETE FROM
WAREHOUSE_LOCATION
WHERE
OBJID = #{OBJID}::numeric
</delete>
<!-- 11월 19일 추가한 창고관리 매퍼 -->
</mapper>

View File

@@ -0,0 +1,182 @@
<!-- 혹시나해서 남겨두는 파일 사실상 필요는 없습니다 -->
<%@ 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>
<!-- //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();
}
});
//search
$("#btnSearch").click(function(){
document.form1.page.value = "1";
fn_search();
});
});
//조회 기능
function fn_search(){
document.form1.action = "/admin/warehouseHistoryList.do";
document.form1.submit();
}
</script>
</head>
<body>
<form name="form1" method="POST">
<input type="hidden" name="objId" id="objId" value="${param.objId}" />
<section id="commonSection" class="admin1">
<div class="admin_title">
<h2>창고관리 이력</h2>
</div>
<div id="adminTableWrap">
<div id="tableWrap">
<table id="adminTable">
<colgroup>
<col width="13%" />
<col width="16%" />
<col width="16%" />
<col width="16%" />
<col width="18%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
</colgroup>
<tr id="thead">
<td>위치코드</td>
<td>위치명</td>
<td>위치설명</td>
<td>가출고코드</td>
<td>가출고거래처명</td>
<td>적합여부</td>
<td>가용재고여부</td>
<td>사용여부</td>
<td>BASELOC_CD</td>
<td>CO_CD</td>
<td>LOC_NMK</td>
<td>INSERT_ID</td>
<td>INSERT_IP</td>
<td>INSERT_DT</td>
<td>MODIFY_ID</td>
<td>MODIFY_IP</td>
<td>MODIFY_DT</td>
<td>ATTR_NMK</td>
</tr>
<c:choose>
<c:when test="${!empty LIST}">
<c:forEach var="info" items="${LIST}" varStatus="status">
<tr>
<td>${info.LOCATION_CODE}</td>
<td>${info.LOCATION_NAME}</td>
<td>${info.LOCATION_DESCRIPTION}</td>
<td>${info.OUT_CODE}</td>
<td>${info.OUT_CO_NAME}</td>
<td>${info.FIT_STATUS}</td>
<td>${info.AVAILABLE_STATUS}</td>
<td>${info.USE_STATUS}</td>
<td>${info.BASE_LOC_CD}</td>
<td>${info.CO_CD}</td>
<td>${info.LOC_NMK}</td>
<td>${info.INSERT_ID}</td>
<td>${info.INSERT_IP}</td>
<td>${info.INSERT_DT}</td>
<td>${info.MODIFY_ID}</td>
<td>${info.MODIFY_IP}</td>
<td>${info.MODIFY_DT}</td>
<td>${info.ATTR_NMK}</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<td align="center" colspan="18">조회된 정보가 없습니다.</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>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
<td>&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
<td>&nbsp;&nbsp;&nbsp;</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>

View File

@@ -0,0 +1,287 @@
<%@ 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" %>
<%
String searchLocationCode = CommonUtils.checkNull(request.getParameter("searchLocationCode"));
String searchLocationName = CommonUtils.checkNull(request.getParameter("searchLocationName"));
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<script>
$(document).ready(function(){
fnc_datepick();
//엔터키로 조회
$("input").keyup(function(e){
if(e.keyCode == 13){
$("#page").val("1");
fn_search();
}
});
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
//삭제
$("#btnDelete").click(function(){
fn_delete();
});
//fn_search(); // 임시 주석 - DB 테이블 생성 후 활성화
});
</script>
<script type="text/javascript">
var columns = [
{title:'OBJID', field:'OBJID', visible:false},
{headerHozAlign:'center', hozAlign:'center', width:'50', title:'NO', field:'RNUM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'기본등록사항[회사코드]', field:'COMP_CODE',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
var objid = fnc_checkNull(cell.getData().OBJID);
openclientMngListInfoPopUp(objid);
}
},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'거래처코드', field:'CLIENT_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'거래처명', field:'CLIENT_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래처약칭', field:'CLIENT_NMK'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'구분', field:'CLIENT_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'사업자등록번호', field:'BUS_REG_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'주민등록번호', field:'RESIDENT_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'대표자명', field:'CEO_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'업태', field:'BUS_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'종목', field:'BUS_ITEM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'우편번호', field:'POST_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'주소1', field:'ADDR1'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'주소2', field:'ADDR2'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'전화번호', field:'TEL_NO'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'팩스번호', field:'FAX_NO'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'홈페이지', field:'HOMEPAGE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'메일주소', field:'EMAIL'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'국가명', field:'COUNTRY_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'분류코드', field:'CLASS_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'분류명', field:'CLASS_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'등급코드', field:'GRADE_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'등급명', field:'GRADE_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'수금거래처코드', field:'COLLECT_CLIENT_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'수금거래처명', field:'COLLECT_CLIENT_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'지역코드', field:'REGION_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'지역명', field:'REGION_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래시작일', field:'TRADE_START_DT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래종료일', field:'TRADE_END_DT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'사용여부', field:'USE_YN'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'계약시작일', field:'CONTRACT_START_DT'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'계약종료일', field:'CONTRACT_END_DT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래형태', field:'TRADE_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'할인율', field:'DISCOUNT_RATE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'계약금액', field:'CONTRACT_AMT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'월용역비', field:'MONTHLY_FEE'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'결제조건', field:'PAYMENT_TERM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'여신한도금액', field:'CREDIT_LIMIT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'한도회귀일', field:'LIMIT_RETURN_DAY'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_금융기관코드', field:'PUR_BANK_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_금융기관명', field:'PUR_BANK_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매입_지점명', field:'PUR_BRANCH_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매입_결제계좌', field:'PUR_ACCOUNT_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_예금주명', field:'PUR_ACCOUNT_HOLDER'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_지급예정', field:'PUR_PAY_PLAN'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_전표유형', field:'PUR_SLIP_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매입_세무구분', field:'PUR_TAX_TYPE'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매출_은행코드', field:'SALE_BANK_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매출_은행명', field:'SALE_BANK_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매출_계좌개설점', field:'SALE_BRANCH_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매출_계좌번호', field:'SALE_ACCOUNT_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'매출_수금예정', field:'SALE_COLLECT_PLAN'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매출_전표유형', field:'SALE_SLIP_TYPE'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'매출_세무구분', field:'SALE_TAX_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_부서명', field:'VENDOR_DEPT_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_직급', field:'VENDOR_POSITION'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_담당업무', field:'VENDOR_DUTY'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_담당자명', field:'VENDOR_MANAGER_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'업체담당_전화번호', field:'VENDOR_TEL'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'업체담당_내선번호', field:'VENDOR_EXT'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_핸드폰', field:'VENDOR_MOBILE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'업체담당_메일', field:'VENDOR_EMAIL'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_부서코드', field:'MGR_DEPT_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'관리담당_부서명', field:'MGR_DEPT_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'관리담당_직급명', field:'MGR_POSITION'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_담당업무', field:'MGR_DUTY'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_사원코드', field:'MGR_EMP_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_사원명', field:'MGR_EMP_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_전화번호', field:'MGR_TEL'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'관리담당_내선번호', field:'MGR_EXT'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'관리담당_핸드폰', field:'MGR_MOBILE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_메일', field:'MGR_EMAIL'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'관리담당_비고', field:'MGR_REMARK'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'수신처_비고', field:'REC_REMARK'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'수신처_우편번호', field:'REC_POST_NO'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'수신처_주소1', field:'REC_ADDR1'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'수신처_주소2', field:'REC_ADDR2'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'수신처_전화번호', field:'REC_TEL'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'수신처_팩스번호', field:'REC_FAX'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'프로젝트코드', field:'PROJECT_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'프로젝트명', field:'PROJECT_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'외부데이터코드', field:'EXT_DATA_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'전자세금계산서여부', field:'E_TAX_YN'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'단위신고거래처', field:'UNIT_REPORT_CLIENT'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'종사업장번호', field:'SUB_BUS_NO'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'조달청다수공급자', field:'PROCUREMENT_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'예정일구분', field:'PLAN_DAY_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'예정일', field:'PLAN_DAY'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'용도구분', field:'PURPOSE_TYPE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'해외여부', field:'FOR_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'사용자정의1', field:'USER_DEF_DC1'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'사용자정의2', field:'USER_DEF_DC2'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'사용구분', field:'USE_FG'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'사용명', field:'USE_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래조건구분', field:'BIZCON_FG'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래조건명', field:'BIZCON_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'배송유형', field:'SHIP_TP'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'배송명', field:'SHIP_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'체크데이터', field:'CHECK_DATA'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'체크상태', field:'CHECK_STATE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'체크순서', field:'CHECK_ORDER'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'고정순서', field:'FIXED_ORDER'}
];
function fn_search(){
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/admin/clientMngListPagingGridList.do", columns, true);
}
function fn_delete(){
var checkedObj = _tabulGrid.getSelectedData();
if(0 < checkedObj.length){
var objId = fnc_checkNull(checkedObj[0].OBJID);
Swal.fire({
title: '선택한 일반거래처정보를 삭제하시겠습니까?',
text: '',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: '확인',
cancelButtonText: '취소',
reverseButtons: false
}).then(result => {
if (result.isConfirmed) {
$.ajax({
type: "POST",
url: "/admin/deleteClient.do",
data: {"OBJID":objId},
dataType:"json",
success:function(data){
if(data.result == 'true'){
Swal.fire("삭제되었습니다.");
fn_search();
}
},
error: function(jqxhr, status, error){
}
});
}
});
}else{
Swal.fire("선택한 항목이 없습니다.");
}
}
function openclientMngListInfoPopUp(objid){
var popup_width = 1200;
var popup_height = 800;
var target = "openclientMngListInfoPopUp";
var url = "/admin/clientMngListFormPopUp.do";
fn_centerPopup(popup_width, popup_height, url, target);
var hiddenForm = document.hiddenForm;
hiddenForm.objid.value = objid;
hiddenForm.target = "openclientMngListInfoPopUp";
hiddenForm.action = "/admin/clientMngListFormPopUp.do";
hiddenForm.submit();
}
</script>
</head>
<body style="overflow-y: hidden;">
<form name="hiddenForm" id="hiddenForm">
<input type="hidden" name="objid">
</form>
<form name="form1" id="form1" method="post">
<input type="hidden" name="status" id="status">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name_gdnsi">
<h2>
<span>일반거래처 관리</span>
</h2>
<div class="btnArea">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="일반거래처등록" class="plm_btns" onclick="javascript:openclientMngListInfoPopUp('');">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
</div>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="label"><label>거래처코드</label></td>
<td><input type="text" name="searchLocationName" id="searchLocationName" value="<%=searchLocationName%>"></td>
<td class="label"><label>거래처명</label></td>
<td><input type="text" name="searchLocationName" id="searchLocationName" value="<%=searchLocationName%>"></td>
<td class="label"><label>사업자등록번호</label></td>
<td><input type="text" name="searchBusinessNo" id="searchBusinessNo"></td>
<td class="label"><label>구분</label></td>
<td>
<select name="searchClientType" id="searchClientType" style="width:200px;" autocomplete="off">
<option value="">전체</option>
<option value="매입">매입처</option>
<option value="매출">매출처</option>
<option value="기타">기타</option>
</select>
</td>
<td class="label"><label>사용여부</label></td>
<td>
<select name="searchUseStatus" id="searchUseStatus">
<option value="">전체</option>
<option value="Y" selected>사용</option>
<option value="N">미사용</option>
</select>
</td>
</tr>
</tbody>
</table>
</div>
<%@include file="/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,482 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@include file="/init.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title><%=Constants.SYSTEM_NAME%></title>
<script type="text/javascript">
function saveClient(){
if(confirm("저장하시겠습니까?")){
var form = document.clientMngForm;
$.ajax({
type: "POST",
url: "/admin/saveClientMngInfo.do",
data: $(form).serialize(),
dataType: "json",
success: function(result){
alert(result.message);
if(result.resultFlag == "true"){
opener.fn_search();
self.close();
}
}
});
}
}
</script>
</head>
<body>
<section id="commonSection" class="admin_option_min">
<div class="admin_title">
<h2>일반 거래처 등록/수정</h2>
</div>
<div id="businessPopupFormWrap">
<form name="clientMngForm" id="clientMngForm">
<input type="hidden" name="objid" value="${info.OBJID}">
<input type="hidden" name="writer" value="<%=session.getAttribute("USER_ID")%>">
<table class="pmsPopupForm">
<tr>
<td class="input_title"><label>회사코드</label></td>
<td><input type="text" name="comp_code" value="${info.COMP_CODE}"></td>
</tr>
<tr>
<td class="input_title"><label>거래처코드</label></td>
<td><input type="text" name="client_cd" value="${info.CLIENT_CD}" required></td>
</tr>
<tr>
<td class="input_title"><label>거래처명</label></td>
<td><input type="text" name="client_nm" value="${info.CLIENT_NM}" required></td>
</tr>
<tr>
<td class="input_title"><label>거래처약칭</label></td>
<td><input type="text" name="client_nmk" value="${info.CLIENT_NMK}"></td>
</tr>
<tr>
<td class="input_title"><label>구분</label></td>
<td><input type="text" name="client_type" value="${info.CLIENT_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>사업자등록번호</label></td>
<td><input type="text" name="bus_reg_no" value="${info.BUS_REG_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>주민등록번호</label></td>
<td><input type="text" name="resident_no" value="${info.RESIDENT_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>대표자명</label></td>
<td><input type="text" name="ceo_nm" value="${info.CEO_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>업태</label></td>
<td><input type="text" name="bus_type" value="${info.BUS_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>종목</label></td>
<td><input type="text" name="bus_item" value="${info.BUS_ITEM}"></td>
</tr>
<tr>
<td class="input_title"><label>우편번호</label></td>
<td><input type="text" name="post_no" value="${info.POST_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>주소1</label></td>
<td><input type="text" name="addr1" value="${info.ADDR1}"></td>
</tr>
<tr>
<td class="input_title"><label>주소2</label></td>
<td><input type="text" name="addr2" value="${info.ADDR2}"></td>
</tr>
<tr>
<td class="input_title"><label>전화번호</label></td>
<td><input type="text" name="tel_no" value="${info.TEL_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>팩스번호</label></td>
<td><input type="text" name="fax_no" value="${info.FAX_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>홈페이지</label></td>
<td><input type="text" name="homepage" value="${info.HOMEPAGE}"></td>
</tr>
<tr>
<td class="input_title"><label>메일주소</label></td>
<td><input type="text" name="email" value="${info.EMAIL}"></td>
</tr>
<tr>
<td class="input_title"><label>국가명</label></td>
<td><input type="text" name="country_nm" value="${info.COUNTRY_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>분류코드</label></td>
<td><input type="text" name="class_cd" value="${info.CLASS_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>분류명</label></td>
<td><input type="text" name="class_nm" value="${info.CLASS_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>등급코드</label></td>
<td><input type="text" name="grade_cd" value="${info.GRADE_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>등급명</label></td>
<td><input type="text" name="grade_nm" value="${info.GRADE_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>수금거래처코드</label></td>
<td><input type="text" name="collect_client_cd" value="${info.COLLECT_CLIENT_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>수금거래처명</label></td>
<td><input type="text" name="collect_client_nm" value="${info.COLLECT_CLIENT_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>지역코드</label></td>
<td><input type="text" name="region_cd" value="${info.REGION_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>지역명</label></td>
<td><input type="text" name="region_nm" value="${info.REGION_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>거래시작일</label></td>
<td><input type="text" name="trade_start_dt" value="${info.TRADE_START_DT}"></td>
</tr>
<tr>
<td class="input_title"><label>거래종료일</label></td>
<td><input type="text" name="trade_end_dt" value="${info.TRADE_END_DT}"></td>
</tr>
<tr>
<td class="input_title"><label>사용여부</label></td>
<td>
<select name="use_yn">
<option value="Y" ${empty info.USE_YN or info.USE_YN eq 'Y' ? 'selected' : ''}>사용</option>
<option value="N" ${info.USE_YN eq 'N' ? 'selected' : ''}>미사용</option>
</select>
</td>
</tr>
<tr>
<td class="input_title"><label>계약시작일</label></td>
<td><input type="text" name="contract_start_dt" value="${info.CONTRACT_START_DT}"></td>
</tr>
<tr>
<td class="input_title"><label>계약종료일</label></td>
<td><input type="text" name="contract_end_dt" value="${info.CONTRACT_END_DT}"></td>
</tr>
<tr>
<td class="input_title"><label>거래형태</label></td>
<td><input type="text" name="trade_type" value="${info.TRADE_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>할인율</label></td>
<td><input type="text" name="discount_rate" value="${info.DISCOUNT_RATE}"></td>
</tr>
<tr>
<td class="input_title"><label>계약금액</label></td>
<td><input type="text" name="contract_amt" value="${info.CONTRACT_AMT}"></td>
</tr>
<tr>
<td class="input_title"><label>월용역비</label></td>
<td><input type="text" name="monthly_fee" value="${info.MONTHLY_FEE}"></td>
</tr>
<tr>
<td class="input_title"><label>결제조건</label></td>
<td><input type="text" name="payment_term" value="${info.PAYMENT_TERM}"></td>
</tr>
<tr>
<td class="input_title"><label>여신한도금액</label></td>
<td><input type="text" name="credit_limit" value="${info.CREDIT_LIMIT}"></td>
</tr>
<tr>
<td class="input_title"><label>한도회귀일</label></td>
<td><input type="text" name="limit_return_day" value="${info.LIMIT_RETURN_DAY}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_금융기관코드</label></td>
<td><input type="text" name="pur_bank_cd" value="${info.PUR_BANK_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_금융기관명</label></td>
<td><input type="text" name="pur_bank_nm" value="${info.PUR_BANK_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_지점명</label></td>
<td><input type="text" name="pur_branch_nm" value="${info.PUR_BRANCH_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_결제계좌</label></td>
<td><input type="text" name="pur_account_no" value="${info.PUR_ACCOUNT_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_예금주명</label></td>
<td><input type="text" name="pur_account_holder" value="${info.PUR_ACCOUNT_HOLDER}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_지급예정</label></td>
<td><input type="text" name="pur_pay_plan" value="${info.PUR_PAY_PLAN}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_전표유형</label></td>
<td><input type="text" name="pur_slip_type" value="${info.PUR_SLIP_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>매입_세무구분</label></td>
<td><input type="text" name="pur_tax_type" value="${info.PUR_TAX_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_은행코드</label></td>
<td><input type="text" name="sale_bank_cd" value="${info.SALE_BANK_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_은행명</label></td>
<td><input type="text" name="sale_bank_nm" value="${info.SALE_BANK_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_계좌개설점</label></td>
<td><input type="text" name="sale_branch_nm" value="${info.SALE_BRANCH_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_계좌번호</label></td>
<td><input type="text" name="sale_account_no" value="${info.SALE_ACCOUNT_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_수금예정</label></td>
<td><input type="text" name="sale_collect_plan" value="${info.SALE_COLLECT_PLAN}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_전표유형</label></td>
<td><input type="text" name="sale_slip_type" value="${info.SALE_SLIP_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>매출_세무구분</label></td>
<td><input type="text" name="sale_tax_type" value="${info.SALE_TAX_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_부서명</label></td>
<td><input type="text" name="vendor_dept_nm" value="${info.VENDOR_DEPT_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_직급</label></td>
<td><input type="text" name="vendor_position" value="${info.VENDOR_POSITION}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_담당업무</label></td>
<td><input type="text" name="vendor_duty" value="${info.VENDOR_DUTY}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_담당자명</label></td>
<td><input type="text" name="vendor_manager_nm" value="${info.VENDOR_MANAGER_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_전화번호</label></td>
<td><input type="text" name="vendor_tel" value="${info.VENDOR_TEL}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_내선번호</label></td>
<td><input type="text" name="vendor_ext" value="${info.VENDOR_EXT}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_핸드폰</label></td>
<td><input type="text" name="vendor_mobile" value="${info.VENDOR_MOBILE}"></td>
</tr>
<tr>
<td class="input_title"><label>업체담당_메일</label></td>
<td><input type="text" name="vendor_email" value="${info.VENDOR_EMAIL}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_부서코드</label></td>
<td><input type="text" name="mgr_dept_cd" value="${info.MGR_DEPT_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_부서명</label></td>
<td><input type="text" name="mgr_dept_nm" value="${info.MGR_DEPT_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_직급명</label></td>
<td><input type="text" name="mgr_position" value="${info.MGR_POSITION}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_담당업무</label></td>
<td><input type="text" name="mgr_duty" value="${info.MGR_DUTY}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_사원코드</label></td>
<td><input type="text" name="mgr_emp_cd" value="${info.MGR_EMP_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_사원명</label></td>
<td><input type="text" name="mgr_emp_nm" value="${info.MGR_EMP_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_전화번호</label></td>
<td><input type="text" name="mgr_tel" value="${info.MGR_TEL}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_내선번호</label></td>
<td><input type="text" name="mgr_ext" value="${info.MGR_EXT}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_핸드폰</label></td>
<td><input type="text" name="mgr_mobile" value="${info.MGR_MOBILE}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_메일</label></td>
<td><input type="text" name="mgr_email" value="${info.MGR_EMAIL}"></td>
</tr>
<tr>
<td class="input_title"><label>관리담당_비고</label></td>
<td><input type="text" name="mgr_remark" value="${info.MGR_REMARK}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_비고</label></td>
<td><input type="text" name="rec_remark" value="${info.REC_REMARK}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_우편번호</label></td>
<td><input type="text" name="rec_post_no" value="${info.REC_POST_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_주소1</label></td>
<td><input type="text" name="rec_addr1" value="${info.REC_ADDR1}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_주소2</label></td>
<td><input type="text" name="rec_addr2" value="${info.REC_ADDR2}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_전화번호</label></td>
<td><input type="text" name="rec_tel" value="${info.REC_TEL}"></td>
</tr>
<tr>
<td class="input_title"><label>수신처_팩스번호</label></td>
<td><input type="text" name="rec_fax" value="${info.REC_FAX}"></td>
</tr>
<tr>
<td class="input_title"><label>프로젝트코드</label></td>
<td><input type="text" name="project_cd" value="${info.PROJECT_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>프로젝트명</label></td>
<td><input type="text" name="project_nm" value="${info.PROJECT_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>외부데이터코드</label></td>
<td><input type="text" name="ext_data_cd" value="${info.EXT_DATA_CD}"></td>
</tr>
<tr>
<td class="input_title"><label>전자세금계산서여부</label></td>
<td><input type="text" name="e_tax_yn" value="${info.E_TAX_YN}"></td>
</tr>
<tr>
<td class="input_title"><label>단위신고거래처</label></td>
<td><input type="text" name="unit_report_client" value="${info.UNIT_REPORT_CLIENT}"></td>
</tr>
<tr>
<td class="input_title"><label>종사업장번호</label></td>
<td><input type="text" name="sub_bus_no" value="${info.SUB_BUS_NO}"></td>
</tr>
<tr>
<td class="input_title"><label>조달청다수공급자</label></td>
<td><input type="text" name="procurement_yn" value="${info.PROCUREMENT_YN}"></td>
</tr>
<tr>
<td class="input_title"><label>예정일구분</label></td>
<td><input type="text" name="plan_day_type" value="${info.PLAN_DAY_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>예정일</label></td>
<td><input type="text" name="plan_day" value="${info.PLAN_DAY}"></td>
</tr>
<tr>
<td class="input_title"><label>용도구분</label></td>
<td><input type="text" name="purpose_type" value="${info.PURPOSE_TYPE}"></td>
</tr>
<tr>
<td class="input_title"><label>해외여부</label></td>
<td><input type="text" name="for_yn" value="${info.FOR_YN}"></td>
</tr>
<tr>
<td class="input_title"><label>사용자정의1</label></td>
<td><input type="text" name="user_def_dc1" value="${info.USER_DEF_DC1}"></td>
</tr>
<tr>
<td class="input_title"><label>사용자정의2</label></td>
<td><input type="text" name="user_def_dc2" value="${info.USER_DEF_DC2}"></td>
</tr>
<tr>
<td class="input_title"><label>사용구분</label></td>
<td><input type="text" name="use_fg" value="${info.USE_FG}"></td>
</tr>
<tr>
<td class="input_title"><label>사용명</label></td>
<td><input type="text" name="use_nm" value="${info.USE_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>거래조건구분</label></td>
<td><input type="text" name="bizcon_fg" value="${info.BIZCON_FG}"></td>
</tr>
<tr>
<td class="input_title"><label>거래조건명</label></td>
<td><input type="text" name="bizcon_nm" value="${info.BIZCON_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>배송유형</label></td>
<td><input type="text" name="ship_tp" value="${info.SHIP_TP}"></td>
</tr>
<tr>
<td class="input_title"><label>배송명</label></td>
<td><input type="text" name="ship_nm" value="${info.SHIP_NM}"></td>
</tr>
<tr>
<td class="input_title"><label>체크데이터</label></td>
<td><input type="text" name="check_data" value="${info.CHECK_DATA}"></td>
</tr>
<tr>
<td class="input_title"><label>체크상태</label></td>
<td><input type="text" name="check_state" value="${info.CHECK_STATE}"></td>
</tr>
<tr>
<td class="input_title"><label>체크순서</label></td>
<td><input type="text" name="check_order" value="${info.CHECK_ORDER}"></td>
</tr>
<tr>
<td class="input_title"><label>고정순서</label></td>
<td><input type="text" name="fixed_order" value="${info.FIXED_ORDER}"></td>
</tr>
<tr>
<td class="input_title"><label>INSERT_ID</label></td>
<td><input type="text" name="insert_id" value="${info.INSERT_ID}"></td>
</tr>
<tr>
<td class="input_title"><label>INSERT_IP</label></td>
<td><input type="text" name="insert_ip" value="${info.INSERT_IP}"></td>
</tr>
<tr>
<td class="input_title"><label>INSERT_DT</label></td>
<td><input type="text" name="insert_dt" value="${info.INSERT_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
</tr>
<tr>
<td class="input_title"><label>MODIFY_ID</label></td>
<td><input type="text" name="modify_id" value="${info.MODIFY_ID}"></td>
</tr>
<tr>
<td class="input_title"><label>MODIFY_IP</label></td>
<td><input type="text" name="modify_ip" value="${info.MODIFY_IP}"></td>
</tr>
<tr>
<td class="input_title"><label>MODIFY_DT</label></td>
<td><input type="text" name="modify_dt" value="${info.MODIFY_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
</tr>
</table>
</form>
</div>
<div id="adminPopupBtnWrap">
<button type="button" class="btns" onclick="saveClient()">저장</button>
</div>
</section>
</body>
</html>

View File

@@ -0,0 +1,182 @@
<!-- 혹시나해서 남겨두는 파일 사실상 필요는 없습니다 -->
<%@ 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>
<!-- //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();
}
});
//search
$("#btnSearch").click(function(){
document.form1.page.value = "1";
fn_search();
});
});
//조회 기능
function fn_search(){
document.form1.action = "/admin/warehouseHistoryList.do";
document.form1.submit();
}
</script>
</head>
<body>
<form name="form1" method="POST">
<input type="hidden" name="objId" id="objId" value="${param.objId}" />
<section id="commonSection" class="admin1">
<div class="admin_title">
<h2>창고관리 이력</h2>
</div>
<div id="adminTableWrap">
<div id="tableWrap">
<table id="adminTable">
<colgroup>
<col width="13%" />
<col width="16%" />
<col width="16%" />
<col width="16%" />
<col width="18%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
<col width="12%" />
</colgroup>
<tr id="thead">
<td>위치코드</td>
<td>위치명</td>
<td>위치설명</td>
<td>가출고코드</td>
<td>가출고거래처명</td>
<td>적합여부</td>
<td>가용재고여부</td>
<td>사용여부</td>
<td>BASELOC_CD</td>
<td>CO_CD</td>
<td>LOC_NMK</td>
<td>INSERT_ID</td>
<td>INSERT_IP</td>
<td>INSERT_DT</td>
<td>MODIFY_ID</td>
<td>MODIFY_IP</td>
<td>MODIFY_DT</td>
<td>ATTR_NMK</td>
</tr>
<c:choose>
<c:when test="${!empty LIST}">
<c:forEach var="info" items="${LIST}" varStatus="status">
<tr>
<td>${info.LOCATION_CODE}</td>
<td>${info.LOCATION_NAME}</td>
<td>${info.LOCATION_DESCRIPTION}</td>
<td>${info.OUT_CODE}</td>
<td>${info.OUT_CO_NAME}</td>
<td>${info.FIT_STATUS}</td>
<td>${info.AVAILABLE_STATUS}</td>
<td>${info.USE_STATUS}</td>
<td>${info.BASE_LOC_CD}</td>
<td>${info.CO_CD}</td>
<td>${info.LOC_NMK}</td>
<td>${info.INSERT_ID}</td>
<td>${info.INSERT_IP}</td>
<td>${info.INSERT_DT}</td>
<td>${info.MODIFY_ID}</td>
<td>${info.MODIFY_IP}</td>
<td>${info.MODIFY_DT}</td>
<td>${info.ATTR_NMK}</td>
</tr>
</c:forEach>
</c:when>
<c:otherwise>
<td align="center" colspan="18">조회된 정보가 없습니다.</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>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td class="no_more_page">prev</td>
<td>&nbsp;&nbsp;&nbsp;</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>&nbsp;&nbsp;&nbsp;</td>
</c:when>
<c:otherwise>
<td><a href="javascript:fnc_goPage('${status.index}');">${status.index}</a></td>
<td>&nbsp;&nbsp;&nbsp;</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>

View File

@@ -0,0 +1,180 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.pms.common.utils.*"%>
<%@include file="/init.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title><%=Constants.SYSTEM_NAME%></title>
<script type="text/javascript">
function saveWarehouse(){
if(confirm("저장하시겠습니까?")){
var form = document.warehouseForm;
// 날짜 형식 변환 (오후 2:23:33 -> 14:23:33)
var insertDt = form.insert_dt.value;
var modifyDt = form.modify_dt.value;
if(insertDt) {
form.insert_dt.value = convertToDBFormat(insertDt);
}
if(modifyDt) {
form.modify_dt.value = convertToDBFormat(modifyDt);
}
$.ajax({
type: "POST",
url: "/admin/saveWarehouseListInfo.do",
data: $(form).serialize(),
dataType: "json",
success: function(result){
alert(result.message);
if(result.resultFlag == "true"){
opener.fn_search();
self.close();
}
}
});
}
}
function convertToDBFormat(dateStr) {
// "2021-06-10 오후 2:23:33" -> "2021-06-10 14:23:33"
if(!dateStr) return '';
var parts = dateStr.split(' ');
if(parts.length < 3) return dateStr;
var date = parts[0]; // 2021-06-10
var ampm = parts[1]; // 오후 or 오전
var time = parts[2]; // 2:23:33
var timeParts = time.split(':');
var hour = parseInt(timeParts[0]);
var minute = timeParts[1];
var second = timeParts[2];
// 오후면 12 더하기 (단, 12시는 그대로)
if(ampm === '오후' && hour !== 12) {
hour += 12;
}
// 오전 12시는 0시로
if(ampm === '오전' && hour === 12) {
hour = 0;
}
// 시간을 2자리로 맞추기
hour = ('0' + hour).slice(-2);
return date + ' ' + hour + ':' + minute + ':' + second;
}
</script>
</head>
<body>
<section id="commonSection" class="admin_option_min">
<div class="admin_title">
<h2>창고 등록/수정</h2>
</div>
<div id="businessPopupFormWrap">
<form name="warehouseForm" id="warehouseForm">
<input type="hidden" name="objid" value="${info.OBJID}">
<input type="hidden" name="writer" value="<%=session.getAttribute("USER_ID")%>">
<table class="pmsPopupForm"">
<tr>
<td class="input_title"><label for=""></label>위치코드<label></td>
<td><input type="text" name="location_code" value="${info.LOCATION_CODE}" required></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>위치명<label></td>
<td><input type="text" name="location_name" value="${info.LOCATION_NAME}" required></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>위치설명<label></td>
<td><input type="text" name="location_description" value="${info.LOCATION_DESCRIPTION}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>가출고코드<label></td>
<td><input type="text" name="out_code" value="${info.OUT_CODE}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>가출고거래처명<label></td>
<td><input type="text" name="out_co_name" value="${info.OUT_CO_NAME}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>적합여부<label></td>
<td>
<select name="fit_status">
<option value="">선택</option>
<option value="Y" ${info.FIT_STATUS eq 'Y' ? 'selected' : ''}>적합</option>
<option value="N" ${info.FIT_STATUS eq 'N' ? 'selected' : ''}>부적합</option>
</select>
</td>
</tr>
<tr>
<td class="input_title"><label for=""></label>가용재고여부<label></td>
<td>
<select name="available_status">
<option value="">선택</option>
<option value="Y" ${info.AVAILABLE_STATUS eq 'Y' ? 'selected' : ''}>여</option>
<option value="N" ${info.AVAILABLE_STATUS eq 'N' ? 'selected' : ''}>부</option>
</select>
</td>
</tr>
<tr>
<td class="input_title"><label for=""></label>사용여부<label></td>
<td>
<select name="use_status">
<option value="Y" ${empty info.USE_STATUS or info.USE_STATUS eq 'Y' ? 'selected' : ''}>사용</option>
<option value="N" ${info.USE_STATUS eq 'N' ? 'selected' : ''}>미사용</option>
</select>
</td>
</tr>
<tr>
<td class="input_title"><label for=""></label>BASELOC_CD<label></td>
<td><input type="text" name="base_loc_cd" value="${info.BASE_LOC_CD}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>CO_CD<label></td>
<td><input type="text" name="co_cd" value="${info.CO_CD}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>LOC_NMK<label></td>
<td><input type="text" name="loc_nmk" value="${info.LOC_NMK}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>INSERT_ID<label></td>
<td><input type="text" name="insert_id" value="${info.INSERT_ID}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>INSERT_IP<label></td>
<td><input type="text" name="insert_ip" value="${info.INSERT_IP}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>INSERT_DT<label></td>
<td><input type="text" name="insert_dt" value="${info.INSERT_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>MODIFY_ID<label></td>
<td><input type="text" name="modify_id" value="${info.MODIFY_ID}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>MODIFY_IP<label></td>
<td><input type="text" name="modify_ip" value="${info.MODIFY_IP}"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>MODIFY_DT<label></td>
<td><input type="text" name="modify_dt" value="${info.MODIFY_DT}" placeholder="YYYY-MM-DD HH:MM:SS"></td>
</tr>
<tr>
<td class="input_title"><label for=""></label>ATTR_NMK<label></td>
<td><input type="text" name="attr_nmk" value="${info.ATTR_NMK}"></td>
</tr>
</table>
</form>
</div>
<div id="adminPopupBtnWrap">
<button type="button" class="btns" onclick="saveWarehouse()">저장</button>
</div>
</section>
</body>
</html>

View File

@@ -0,0 +1,166 @@
<%@ 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" %>
<%
String searchLocationCode = CommonUtils.checkNull(request.getParameter("searchLocationCode"));
String searchLocationName = CommonUtils.checkNull(request.getParameter("searchLocationName"));
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<script>
$(document).ready(function(){
fnc_datepick();
//엔터키로 조회
$("input").keyup(function(e){
if(e.keyCode == 13){
$("#page").val("1");
fn_search();
}
});
$("#btnSearch").click(function(){
$("#page").val("1");
fn_search();
});
//삭제
$("#btnDelete").click(function(){
fn_delete();
});
fn_search();
});
</script>
<script type="text/javascript">
var columns = [
{title:'OBJID', field:'OBJID', visible:false},
{headerHozAlign:'center', hozAlign:'center', width:'50', title:'NO', field:'RNUM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'위치코드', field:'LOCATION_CODE',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
var objid = fnc_checkNull(cell.getData().OBJID);
openwarehouseListInfoPopUp(objid);
}
},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'위치명', field:'LOCATION_NAME'},
{headerHozAlign:'center', hozAlign:'left', width:'200', title:'위치설명', field:'LOCATION_DESCRIPTION'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'가출고코드', field:'OUT_CODE'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'가출고거래처명', field:'OUT_CO_NAME'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'적합여부', field:'FIT_STATUS'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'가용재고여부', field:'AVAILABLE_STATUS'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'사용여부', field:'USE_STATUS'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'BASELOC_CD', field:'BASE_LOC_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'80', title:'CO_CD', field:'CO_CD'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'LOC_NMK', field:'LOC_NMK'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'INSERT_ID', field:'INSERT_ID'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'INSERT_IP', field:'INSERT_IP'},
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'INSERT_DT', field:'INSERT_DT'},
{headerHozAlign:'center', hozAlign:'center', width:'100', title:'MODIFY_ID', field:'MODIFY_ID'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'MODIFY_IP', field:'MODIFY_IP'},
{headerHozAlign:'center', hozAlign:'center', width:'150', title:'MODIFY_DT', field:'MODIFY_DT'},
{headerHozAlign:'center', hozAlign:'left', width:'150', title:'ATTR_NMK', field:'ATTR_NMK'}
];
function fn_search(){
_tabulGrid = fnc_tabul_search(_tabul_layout_fitColumns, _tabulGrid, "/admin/warehouseListPagingGridList.do", columns, true);
}
function fn_delete(){
var checkedObj = _tabulGrid.getSelectedData();
if(0 < checkedObj.length){
var objId = fnc_checkNull(checkedObj[0].OBJID);
Swal.fire({
title: '선택한 창고정보를 삭제하시겠습니까?',
text: '',
icon: 'warning',
showCancelButton: true,
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: '확인',
cancelButtonText: '취소',
reverseButtons: false
}).then(result => {
if (result.isConfirmed) {
$.ajax({
type: "POST",
url: "/admin/deleteWarehouse.do",
data: {"OBJID":objId},
dataType:"json",
success:function(data){
if(data.result == 'true'){
Swal.fire("삭제되었습니다.");
fn_search();
}
},
error: function(jqxhr, status, error){
}
});
}
});
}else{
Swal.fire("선택한 항목이 없습니다.");
}
}
function openwarehouseListInfoPopUp(objid){
var popup_width = 400;
var popup_height = 800;
var target = "openwarehouseListInfoPopUp";
var url = "/admin/warehouseListFormPopUp.do";
fn_centerPopup(popup_width, popup_height, url, target);
var hiddenForm = document.hiddenForm;
hiddenForm.objid.value = objid;
hiddenForm.target = "openwarehouseListInfoPopUp";
hiddenForm.action = "/admin/warehouseListFormPopUp.do";
hiddenForm.submit();
}
</script>
</head>
<body style="overflow-y: hidden;">
<form name="hiddenForm" id="hiddenForm">
<input type="hidden" name="objid">
</form>
<form name="form1" id="form1" method="post">
<input type="hidden" name="status" id="status">
<div class="content-box">
<div class="content-box-s">
<div class="plm_menu_name_gdnsi">
<h2>
<span>창고 관리</span>
</h2>
<div class="btnArea">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="창고등록" class="plm_btns" onclick="javascript:openwarehouseListInfoPopUp('');">
<input type="button" value="삭제" class="plm_btns" id="btnDelete">
</div>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="label"><label>위치코드</label></td>
<td><input type="text" name="searchLocationCode" id="searchLocationCode" value="<%=searchLocationCode%>"></td>
<td class="label"><label>위치명</label></td>
<td><input type="text" name="searchLocationName" id="searchLocationName" value="<%=searchLocationName%>"></td>
</tr>
</tbody>
</table>
</div>
<%@include file="/WEB-INF/view/common/common_gridArea.jsp" %>
</div>
</div>
</form>
</body>
</html>

View File

@@ -255,6 +255,7 @@ var columns = [
return Number(value).toLocaleString();
}
},
/* 수주수량 컬럼 주석처리
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '수주수량', field : 'ORDER_QUANTITY',
formatter: function(cell) {
var value = cell.getValue();
@@ -262,6 +263,7 @@ var columns = [
return Number(value).toLocaleString();
}
},
*/
{headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '유/무상', field : 'PAID_TYPE' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '80', title : '제품구분', field : 'PRODUCT_NAME' },
// {headerHozAlign : 'center', hozAlign : 'center', width : '88', title : '국내/해외', field : 'AREA_NAME' },

View File

@@ -149,13 +149,15 @@ var columns = [
},
{headerHozAlign : 'center', hozAlign : 'left', width : '150', title : '고객사', field : 'CUSTOMER_NAME' },
{headerHozAlign : 'center', hozAlign : 'left', width : '180', title : '품명', field : 'ITEM_SUMMARY' },
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '견적수량', field : 'ESTIMATE_QUANTITY',
formatter: function(cell) {
var value = cell.getValue();
if(!value || value === '' || value === '0') return '';
return Number(value).toLocaleString();
}
},
/* 견적수량 컬럼 주석처리
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '견적수량', field : 'ESTIMATE_QUANTITY',
formatter: function(cell) {
var value = cell.getValue();
if(!value || value === '' || value === '0') return '';
return Number(value).toLocaleString();
}
},
*/
{headerHozAlign : 'center', hozAlign : 'right', width : '100', title : '수주수량', field : 'ORDER_QUANTITY',
formatter: function(cell) {
var value = cell.getValue();

View File

@@ -564,7 +564,7 @@ function fn_bulkRegister(){
</h2>
<div class="btnArea">
<input type="button" value="조회" class="plm_btns" id="btnSearch">
<input type="button" value="거래명세서 출력" class="plm_btns" id="btnTransactionStatement" style="background-color: #2196F3; color: white;">
<input type="button" value="거래명세서 생성" class="plm_btns" id="btnTransactionStatement" style="background-color: #2196F3; color: white;">
<input type="button" value="출하지시/판매등록" class="plm_btns" id="btnBulkRegister" style="background-color: #4CAF50; color: white;">
</div>
</div>

View File

@@ -244,22 +244,50 @@ body {
.amount-text {
font-size: 13pt;
font-weight: bold;
flex: 2;
flex: 3;
text-align: right;
padding-right: 10px;
}
.amount-won-wrapper {
display: flex;
align-items: center;
justify-content: center;
flex: 1;
padding: 4px 8px;
font-size: 9pt;
}
.amount-won-text {
font-size: 9pt;
font-weight: normal;
margin-right: 4px;
}
.amount-won-symbol {
font-size: 16pt;
font-size: 9pt;
font-weight: normal;
}
.amount-number-wrapper {
display: flex;
align-items: center;
justify-content: flex-start;
flex: 2;
padding: 4px 8px;
}
.amount-number-wrapper .amount-won-symbol {
font-size: 15pt;
font-weight: bold;
flex: 0.5;
text-align: center;
margin-right: 4px;
}
.amount-number {
font-size: 15pt;
font-weight: bold;
flex: 2;
text-align: right;
flex: 1;
}
/* 품목 테이블 */
@@ -525,7 +553,7 @@ function fn_loadEmptyStatement(gridData) {
$("#totalQuantity").text("0");
$("#totalSupplyPrice").text("0");
$("#totalVat").text("0");
$("#totalText").text("0");
$("#totalText").text("");
$("#totalNum").text("0");
// contenteditable 셀 변경 시 합계 자동 업데이트
@@ -593,14 +621,14 @@ function fn_loadSavedStatement(projectNo, gridData) {
tbody.append(row);
}
// 합계 업데이트
$("#totalQuantity").text(totalQuantity);
$("#totalSupplyPrice").text(fn_num(totalSupply));
$("#totalVat").text(fn_num(Math.round(totalVat)));
var total = totalSupply + totalVat;
$("#totalText").text(Math.round(total).toString());
$("#totalNum").text(fn_num(Math.round(total)));
// 합계 업데이트
$("#totalQuantity").text(totalQuantity);
$("#totalSupplyPrice").text(fn_num(totalSupply));
$("#totalVat").text(fn_num(Math.round(totalVat)));
var total = totalSupply + totalVat;
$("#totalText").text(fn_numberToKorean(Math.round(total)));
$("#totalNum").text(fn_num(Math.round(total)));
// contenteditable 셀 변경 시 합계 자동 업데이트
fn_attachCellListeners();
@@ -767,7 +795,7 @@ function fn_fillData(data) {
console.log("총 세액:", totalVat);
console.log("총 금액:", total);
$("#totalText").text(total.toString());
$("#totalText").text(fn_numberToKorean(total));
$("#totalNum").text(fn_num(total));
// 비고에 S/N 정보 표시
@@ -829,7 +857,7 @@ function fn_recalculateTotal() {
// 상단 합계 금액 업데이트
var total = totalSupply + totalVat;
$("#totalText").text(total.toString());
$("#totalText").text(fn_numberToKorean(total));
$("#totalNum").text(fn_num(total));
}
@@ -837,6 +865,46 @@ function fn_num(n) {
return n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
// 숫자를 한글로 변환하는 함수
function fn_numberToKorean(num) {
if(num === 0) return "영";
var units = ["", "만", "억", "조"];
var smallUnits = ["", "십", "백", "천"];
var numbers = ["", "일", "이", "삼", "사", "오", "육", "칠", "팔", "구"];
var result = "";
var unitIndex = 0;
while(num > 0) {
var part = num % 10000;
if(part > 0) {
var partStr = "";
var digit = 0;
while(part > 0) {
var n = part % 10;
if(n > 0) {
// 1은 십, 백, 천 앞에서 생략 (예: 십, 백, 천)
if(n === 1 && digit > 0) {
partStr = smallUnits[digit] + partStr;
} else {
partStr = numbers[n] + smallUnits[digit] + partStr;
}
}
part = Math.floor(part / 10);
digit++;
}
result = partStr + units[unitIndex] + result;
}
num = Math.floor(num / 10000);
unitIndex++;
}
return result;
}
function fn_save() {
if(!confirm("수정한 내용을 저장하시겠습니까?")) {
return;
@@ -1000,10 +1068,15 @@ function fn_close() {
<!-- 합계 금액 -->
<div class="amount-row">
<span class="amount-label">(공급가액+세액)</span>
<span class="amount-text"><span id="totalText" contenteditable="true">3300000</span> 원정</span>
<span class="amount-won-symbol">₩</span>
<span class="amount-won-symbol">₩</span>
<span class="amount-number"><span id="totalNum" contenteditable="true">3,300,000</span></span>
<span class="amount-text"><span id="totalText" contenteditable="true">3300000</span></span>
<span class="amount-won-wrapper">
<span class="amount-won-text">원정</span>
<span class="amount-won-symbol">₩</span>
</span>
<span class="amount-number-wrapper">
<span class="amount-won-symbol">₩</span>
<span class="amount-number"><span id="totalNum" contenteditable="true">3,300,000</span></span>
</span>
</div>
<!-- 품목 테이블 -->