Files
KIN/project/cp_search_2014.asp
2025-09-29 17:55:08 +09:00

143 lines
4.1 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<%
v = request("v")
p_cli_company_cd = request("p_cli_company_cd")
if p_cli_company_cd = "" then
alert4 "Client를 선택하지 않았거나 DB오류입니다"
else
query = "SELECT * "
query = query & "FROM V_CLIENT_PERSON "
query = query & "WHERE p_cli_company_cd = '" & p_cli_company_cd & "' "
rsc.Open query, adoConn, 1
%>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=euc-kr">
<LINK rel="stylesheet" type="text/css" href="/lib/text.css">
<title>
클라이언트 담당자 찾기
</title>
<script language=javascript>
function sltit(code,depart,name,com_tel,tel,email,v) {
//code:cp_code, name:cp_name, x:cp_depart, w:page(1=modi, 2.3.4=search)
if (v = 1) {
opener.document.pms.p_cli_per_cd.value = code;
opener.document.pms.p_cli_depart.value = depart;
opener.document.pms.p_cli_per_nm.value = name;
opener.document.pms.p_cli_per_com_tel.value = com_tel;
opener.document.pms.p_cli_per_tel.value = tel;
opener.document.pms.p_cli_per_email.value = email;
if (email == "" && (tel == "" || com_tel == "")) {
alert("수행계획서로 전환 시에는 Client 담당자의 \nEmail과 휴대폰번호 또는 회사 전화번호가 필수이므로 \n유의하시기 바랍니다.");
}
}
self.close();
}
function search_cli() {
//if (document.pms.cli_name.value.trim() == '') {
// alert('클라이언트명을 작성해 주세요');
// document.pms.cli_name.value = '';
// document.pms.cli_name.focus();
// return false;
//}
document.pms.cli_name.value = document.pms.cli_name.value.trim();
//document.pms.action = 'search_cli.asp';
document.pms.submit();
}
function modit(count) {
var p_cli_per_cd = "";
if (count >= 2)
{
for (i = 1; i <= count; i++) {
if (document.pms.mod_cli[i - 1].checked == true) {
p_cli_per_cd = document.pms.mod_cli[i - 1].value;
}
}
}
else
{
if (document.pms.mod_cli.checked == true)
{
p_cli_per_cd = document.pms.mod_cli.value;
}
}
if (p_cli_per_cd == "") {
alert('Client 담당자를 선택해 주세요');
document.pms.mod_cli[0].focus();
return false;
}
document.pms.action = 'cp_modi_2014.asp?p_cli_per_cd=' + p_cli_per_cd;
document.pms.submit();
}
function newit() {
document.pms.action = 'cp_modi_2014.asp';
document.pms.submit();
}
</script>
</head>
<body>
<form name="pms" method="post">
<input type="hidden" name="p_cli_company_cd" value="<%=p_cli_company_cd%>">
<div style="position: absolute; left: 10px; top: 4px; z-index: 10;">
<table border="0" cellspacing="0" cellpadding="0" width="335" bgcolor="white">
<tr align="right">
<td>
<input type="button" value="추가" onClick="newit()">
&nbsp;
<input type="button" value="수정" onClick="modit('<%=rsc.RecordCount%>')">
</td>
</tr>
</table>
</div>
<br>
<div style="width: 335px; height: 250px; overflow-y: auto;">
<table border="1" cellspacing="0" cellpadding="0" width="335">
<tr align="center" height="20">
<td width="20">&nbsp;</td>
<td><font color="blue"><b>Client 담당자</b></font></td>
<td width="80"><font color="blue"><b>부서명</b></font></td>
</tr>
<%
for i = 1 to rsc.RecordCount
%>
<tr align="center">
<td><input type="radio" name="mod_cli" value="<%=rsc("p_cli_per_cd")%>">
<input type="hidden" name="mod_cli_email" value="<%=rsc("p_cli_per_email") %>" />
</td>
<td>&nbsp;
<a href="javascript:sltit('<%=rsc("p_cli_per_cd")%>','<%=rsc("p_cli_depart")%>','<%=rsc("p_cli_per_nm")%>','<%=rsc("p_cli_per_com_tel")%>','<%=rsc("p_cli_per_tel")%>','<%=rsc("p_cli_per_email")%>','<%=v%>')">
<font color="blue"><%=rsc("p_cli_per_nm")%></font></a></td>
<td align="center"><%=rsc("p_cli_depart")%></td>
</tr>
<%
rsc.MoveNext
next
%>
</table>
</div>
<br>
<font color="red">*</font> 내용을 <font color="red">수정</font>하려면 Client 코드앞의 라디오버튼을 선택하고 <br>&nbsp;&nbsp;&nbsp;수정 버튼을 눌러 주세요.
<%
rsc.Close
end if 'if p_cli_company_cd = "" then
set rsc = nothing
%>