ERP-node/WebContent/WEB-INF/view/salesmgmt/common/searchCustomerPopup.jsp

176 lines
4.7 KiB
Plaintext

<%
/**
* 검색 팝업 고객코드
* @since 2021.10.01
* @author kim
* @version 1.0
*
* << 개정 이력 >>
*
* 수정일 수정자 수정내용
* ---------------- --------------------- --------------------------------------------------------
* 2021.10.01 김효일 최초작성
**/
%>
<%@ 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" %>
<%
PersonBean person = (PersonBean)session.getAttribute(Constants.PERSON_BEAN);
String connector = person.getUserId();
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><%=Constants.SYSTEM_NAME%></title>
<link rel="stylesheet" href="/css/ions-basic.css">
<script type="text/javascript" src="/js/ions-common.js" ></script>
<script type="text/javascript">
var selectedItem = {
custCd: '',
custNm: '',
taxNo1: '',
taxNo2: '',
custBoss: '',
deptNm: '',
salesmanNm: ''
};
$(function(){
$(document).ready(function() {
// 고객 조회
$("#btnSearch").click(function() {
fn_search();
});
// 고객 선택
$("#btnSelect").click(function(){
if (selectedItem.custCd === '') {
Swal.fire("등록 할 고객을 선택해 주세요.");
return;
}
/*
opener.form1.custCd.value = selectedItem.custCd;
opener.form1.custNm.value = selectedItem.custNm;
opener.form1.taxNo1.value = selectedItem.taxNo1;
opener.form1.taxNo2.value = selectedItem.taxNo2;
opener.form1.taxNo2.value = selectedItem.taxNo2;
*/
opener.customerSelected(selectedItem);
self.close(0);
});
});
});
// 검색
function fn_search() {
document.form1.action = "/common/salesMgmt/searchCustomer.do";
document.form1.submit();
}
// 제품코드 선택
function itemClick(custCd, custNm, taxNo1, taxNo2, custBoss, deptNm, salesmanNm) {
selectedItem.custCd = custCd;
selectedItem.custNm = custNm;
selectedItem.taxNo1 = taxNo1;
selectedItem.taxNo2 = taxNo2;
selectedItem.custBoss = custBoss;
selectedItem.deptNm = deptNm;
selectedItem.salesmanNm = salesmanNm;
$("tr").removeClass("selected");
$("#" + custCd).addClass("selected");
}
</script>
</head>
<body class="backcolor">
<section>
<div id="businessPopupFormWrap">
<!--// form1 -->
<form name="form1" id="form1" method="GET">
<div id="plmSearchZon">
<table>
<tbody>
<tr>
<td class="align_r">
<label for="" class="">고객명</label>
</td>
<td>
<input type="text" name="condCustNm" id="condCustNm" value="${param.condCustNm}" style="width: 100px;" />
</td>
<td style="padding-right:15px;">&nbsp;</td>
<td><input type="button" value="검색" class="gray_btns" id="btnSearch" /></td>
</tr>
</tbody>
</table>
</div>
<!--// 제품코드 리스트 -->
<table class="plm_table table-hover">
<colgroup>
<col width="10%" />
<col width="*" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
<col width="10%" />
</colgroup>
<thead>
<tr class="plm_thead">
<td>고객코드</td>
<td>고객명</td>
<td>대표자</td>
<td>사업자번호</td>
<td>법인/주민번호</td>
<td>계약부서</td>
<td>계약자</td>
</tr>
</thead>
<tbody>
<c:choose>
<c:when test="${empty LIST}">
<tr style="text-align:center;">
<td align="center" colspan="7">조회된 데이터가 없습니다.</td>
</tr>
</c:when>
<c:otherwise>
<c:forEach var="item" items="${LIST}" varStatus="varStatus">
<tr onclick="itemClick('${item.CUSTCD}', '${item.CUSTNM}', '${item.CUSTBOSS}', '${item.TAXNO1}', '${item.TAXNO2}', '${item.DEPTNM}', '${item.SALESMANNM}')" id="${item.CUSTCD}">
<td>${item.CUSTCD}</td>
<td>${item.CUSTNM}</td>
<td>${item.CUSTBOSS}</td>
<td>${item.TAXNO1}</td>
<td>${item.TAXNO2}</td>
<td>${item.DEPTNM}</td>
<td>${item.SALESMANNM}</td>
</tr>
</c:forEach>
</c:otherwise>
</c:choose>
</tbody>
</table>
<!--// 제품코드 리스트 -->
<!--// pdm_page -->
<%@include file="paging.jsp" %>
<!--// pdm_page -->
</form>
<!--// form1 -->
<div class="btn_wrap">
<div class="plm_btn_wrap">
<input type="button" value="선택" class="plm_btns" id="btnSelect">
</div>
</div>
</div>
<p></p>
</section>
</body>
</html>