Files
wace_plm/WebContent/WEB-INF/view/admin/clientMng/clientMngList.jsp
2025-12-02 18:09:47 +09:00

318 lines
17 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" %>
<%
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();
});
function saveexcelpop() {
var url = "/admin/clientExcelImportPopUp.do";
var target = "clientExcelImportPopUp";
window
.open(url, target,
"width=1200, height=700, menubars=no, scrollbars=yes, resizable=yes");
}
</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:'TR_NMK', field:'TR_NMK'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'거래처약칭', field:'CLIENT_NMK',
formatter: fnc_createGridAnchorTag,
cellClick: function(e, cell) {
var objid = fnc_checkNull(cell.getData().OBJID);
openclientMngListInfoPopUp(objid);
}
},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'ATTR_NMK', field:'ATTR_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:'center', width:'120', title:'CEO_NMK', field:'CEO_NMK'},
{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:'ADDR_FG', field:'ADDR_FG'},
{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:'LIQ_RS', field:'LIQ_RS'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'주류명', field:'TR_FG'},
{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:'RCP_TP', field:'RCP_TP'},
{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:'REC_ADDR_FG', field:'REC_ADDR_FG'},
{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:'PJT_NMK', field:'PJT_NMK'},
{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:'USER_DEF_DC1', field:'USER_DEF_DC1'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'USER_DEF_DC2', field:'USER_DEF_DC2'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'REGION_CD', field:'REGION_CD'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'REGION_NM', field:'REGION_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'USE_FG', field:'USE_FG'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'USE_NM', field:'USE_NM'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'BIZCON_FG', field:'BIZCON_FG'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'BIZCON_NM', field:'BIZCON_NM'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'SHIP_TP', field:'SHIP_TP'},
{headerHozAlign:'center', hozAlign:'left', width:'120', title:'SHIP_NM', field:'SHIP_NM'},
{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:'FOR_YN', field:'FOR_YN'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'CHECK_DATA', field:'CHECK_DATA'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'CHECK_STATE', field:'CHECK_STATE'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'CHECK_ORDER', field:'CHECK_ORDER'},
{headerHozAlign:'center', hozAlign:'center', width:'120', title:'FIXED_ORDER', 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">
<!-- <input type="button" value="Excel Upload" class="plm_btns" onclick="saveexcelpop();"> -->
</div>
</div>
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="label"><label>거래처코드</label></td>
<td><input type="text" name="searchClientCd" id="searchClientCd"></td>
<td class="label"><label>거래처명</label></td>
<td><input type="text" name="searchClientNm" id="searchClientNm"></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="" selected>전체</option>
<option value="Y">사용</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>