452 lines
16 KiB
Plaintext
452 lines
16 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
|
<OBJECT RUNAT=Server PROGID=ADODB.Recordset id=rsp></OBJECT>
|
|
<OBJECT RUNAT=Server PROGID=ADODB.Recordset id=rsa></OBJECT>
|
|
<!-- #include virtual = "include/left.asp" -->
|
|
<!-- Content Wrapper. Contains page content -->
|
|
<div class="content-wrapper">
|
|
<!-- Content Header (Page header) -->
|
|
<div class="content-header">
|
|
<h1></h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
|
|
|
|
<!-- 결재요청용 팝업 체크 -->
|
|
<%
|
|
''' response.write request("p_sn") & ", " & request("p_sub_type") & "<br>"
|
|
p_sub_type = request("p_sub_type")
|
|
|
|
'project테이블 입력
|
|
'---------------------------------------
|
|
'p_sn만들기
|
|
query = "SELECT p_sn "
|
|
query = query & "FROM T_PROJECT_BASE "
|
|
query = query & "WHERE substring(p_sn, 0, 5) = '" & right("0" & year(date()), 2) & right("0" & month(date()), 2) & "' "
|
|
query = query & " AND substring(p_sn, 5, 3) <> '000' "
|
|
query = query & " AND substring(p_sn, 8, 1) <> '_' " '서브 프로젝트가 상위로 올라오는 것을 막음
|
|
query = query & "ORDER BY p_sn DESC "
|
|
|
|
rsc.Open query, adoConn, 1
|
|
if rsc.RecordCount > 0 then
|
|
if instr(1, rsc("p_sn"), "_") then
|
|
p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & right("000" & int(left(right(rsc("p_sn"), 5), 3)) + 1, 3)
|
|
else
|
|
p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & right("000" & int(right(rsc("p_sn"), 3)) + 1, 3)
|
|
end if
|
|
else
|
|
p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & "001"
|
|
end if
|
|
rsc.Close
|
|
|
|
if request("p_sn") <> "" then
|
|
p_sn = request("p_sn")
|
|
end if
|
|
|
|
'프로젝트 기본 정보 가져오기
|
|
query = " SELECT p_sn, PB.p_cli_company_cd as p_cli_company_cd, PB.p_cli_per_cd as p_cli_per_cd, "
|
|
query = query & " p_state, p_subject, p_cli_company_nm, CP.p_cli_depart as p_cli_depart, "
|
|
query = query & " p_cli_per_nm, p_cli_per_com_tel, p_cli_per_tel, p_cli_per_email, "
|
|
query = query & " PB.p_client_type_cd as p_client_type_cd, p_cont_cost, p_decide_date, p_memo, p_state, pb.p_depart_dep as p_depart_dep "
|
|
query = query & " FROM "
|
|
query = query & " T_PROJECT_BASE PB INNER JOIN V_CLIENT_COMP CC ON PB.p_cli_company_cd = CC.p_cli_company_cd "
|
|
query = query & " INNER JOIN V_CLIENT_PERSON CP ON PB.P_CLI_PER_CD = CP.P_CLI_PER_CD "
|
|
query = query & " INNER JOIN T_CLIENT_TYPE_CD CTC ON PB.p_client_type_cd = CTC.p_client_type_cd "
|
|
query = query & " WHERE p_sn = '"&p_sn& "'"
|
|
|
|
rsc.Open query, adoConn, 1
|
|
|
|
|
|
'조사방법 가져오기
|
|
query = " SELECT PMC.p_method_cd, p_method_nm, p_intention, p_child_sn, p_progress_status "
|
|
query = query & " FROM T_PROJECT_METHOD PM INNER JOIN T_PROJECT_METHOD_CD PMC ON PM.p_method_cd = PMC.p_method_cd "
|
|
query = query & " WHERE p_method_yn = 'y' "
|
|
query = query & " AND p_sn = '" & p_sn & "'"
|
|
query = query & " AND p_sub_type = '" & p_sub_type & "'"
|
|
|
|
rsa.Open query, adoConn, 1
|
|
|
|
'화면 초기값 설정.
|
|
'------------------------------------------------------------------------------------
|
|
'조사방법을 제외한 컬럼들의 초기값
|
|
|
|
|
|
p_cli_company_cd = "" '회사 코드
|
|
p_cli_per_cd = "" '담당자 코드
|
|
|
|
p_state = "" '프로젝트 현재 상태
|
|
p_subject = "" '프로젝트명
|
|
p_cli_company_nm = "" '회사명
|
|
p_cli_depart = "" '부서명
|
|
p_cli_per_nm = "" '담당자 이름
|
|
p_cli_per_com_tel = "" '담당자 전화번호
|
|
p_cli_per_tel = "" '담당자 전화번호
|
|
p_cli_per_email = "" '담당자 이메일
|
|
p_client_type_cd = "" '업종
|
|
|
|
p_cont_cost = "" '예상 계약액
|
|
p_decide_date = "" '결정 예정일
|
|
p_memo = "" '메모
|
|
p_depart_dep = "" '입력한 부서
|
|
|
|
p_method_count = 0
|
|
if rsc.RecordCount > 0 Then
|
|
p_method_count = rsc.RecordCount
|
|
if rsc("p_state") <> "" then
|
|
p_cli_company_cd = rsc("p_cli_company_cd")
|
|
p_cli_per_cd = rsc("p_cli_per_cd")
|
|
|
|
p_state = rsc("p_state")
|
|
p_subject = rsc("p_subject")
|
|
p_cli_company_nm = rsc("p_cli_company_nm")
|
|
p_cli_depart = rsc("p_cli_depart")
|
|
p_cli_per_nm = rsc("p_cli_per_nm")
|
|
p_cli_per_com_tel = rsc("p_cli_per_com_tel")
|
|
p_cli_per_tel = rsc("p_cli_per_tel")
|
|
p_cli_per_email = rsc("p_cli_per_email")
|
|
p_client_type_cd = rsc("p_client_type_cd")
|
|
p_depart_dep = rsc("p_depart_dep")
|
|
|
|
'예상 계약액 ,수정
|
|
if rsc("p_cont_cost") <> "" then
|
|
tmp_len = len(rsc("p_cont_cost"))
|
|
for i = 1 to int(tmp_len)
|
|
if i mod 3 = 1 and i <> 1 then
|
|
p_cont_cost = "," & p_cont_cost
|
|
end if
|
|
p_cont_cost = left(right(rsc("p_cont_cost"),i), 1) & p_cont_cost
|
|
next
|
|
end if
|
|
if int(p_cont_cost) = 0 then
|
|
p_cont_cost=1
|
|
end if
|
|
|
|
p_decide_date = rsc("p_decide_date")
|
|
p_memo = rsc("p_memo")
|
|
|
|
end if
|
|
end if
|
|
|
|
'조사방법 초기값
|
|
' 2023-06-07 서성완
|
|
'조사방법 추가로 갯수만큼 p_method_cd() 배열 부여
|
|
Dim p_method_cd()
|
|
Dim p_child_sn()
|
|
Dim p_progress_status
|
|
ReDim p_method_cd(rsa.recordCount)
|
|
ReDim p_child_sn(rsa.recordCount)
|
|
'조사방법에 아무것도 없을때
|
|
|
|
if rsa.recordCount > 0 then
|
|
'기존 조사방법 저장
|
|
for i=1 to rsa.recordCount
|
|
p_method_cd(i) = rsa("p_method_cd")
|
|
p_child_sn(i) = rsa("p_child_sn")
|
|
If i = 1 Then
|
|
p_method_cd_str = rsa("p_method_cd")
|
|
Else
|
|
p_method_cd_str = p_method_cd_str & "," & rsa("p_method_cd")
|
|
End if
|
|
p_progress_status = rsa("p_progress_status")
|
|
|
|
rsa.MoveNext
|
|
next
|
|
else
|
|
p_method_cd(1) = "0"
|
|
p_progress_status = "000"
|
|
end if
|
|
|
|
rsa.close
|
|
rsc.close
|
|
%>
|
|
<form id="proposalForm" name="pms" method="post">
|
|
<input type="hidden" name="p_sn" value="<%=p_sn %>"/>
|
|
<input type="hidden" name="p_sub_type" value="<%=p_sub_type%>"/>
|
|
<input type="hidden" name="p_method_cd" value="<%=p_method_cd_str%>"/>
|
|
<% If p_sub_type = "C" Then %>
|
|
<input type="hidden" name="p_child_sn" value="<%=p_child_sn(1)%>"/>
|
|
<% End If %>
|
|
<input type="hidden" name="p_progress_status" value="<%=p_progress_status%>"/>
|
|
<input type="hidden" name="state" value="<%=p_state %>"/>
|
|
<input type="hidden" name="user_no" value="<%=Session("User_Number")%>"/>
|
|
<input type="hidden" name="f_work_type" value="001"/>
|
|
|
|
<input type="hidden" name="current_p_sub_type" value=""/>
|
|
<input type="hidden" name="current_p_method_cd" value=""/>
|
|
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr height="26">
|
|
<td colspan="5" style="padding: 0 0 0 0;">
|
|
<div style="position:relative; padding: 0px; margin: 0px;">
|
|
<img src="/images/main/bubble_1num.png" style="">
|
|
<span style="position:absolute; top: 1px; left: 27px; font-size: 12pt; font-weight:bold;">프로젝트 추가</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td style="padding:5 0 0 0;">
|
|
<table width="870" class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
|
<tr>
|
|
<td colspan="2" width="15%" class='tit2' align="center" >프로젝트 번호</td>
|
|
<td width="35%" class='tit7' >
|
|
<input type="text" style="width:300;" name="p_sn_show" value="<%=p_sn %>" readonly>
|
|
</td>
|
|
<td colspan="2" align="center" class='tit2'>프로젝트 명</td>
|
|
<td width="35%" class='tit7' >
|
|
<input type="text" style="width:300;" id="p_subject" name="p_subject" value="<%=p_subject %>">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center" class='tit2'>조사방법</td>
|
|
<td colspan="4" class='tit7'>
|
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<%
|
|
q = "SELECT * "
|
|
q = q & "FROM T_PROJECT_METHOD_CD "
|
|
|
|
rsp.Open q, adoConn, 1
|
|
i=0
|
|
j=1
|
|
do while not rsp.eof
|
|
i=i+1
|
|
|
|
If p_sub_type = "C" Then
|
|
If rsp("p_method_cd") = p_method_cd(1) Then
|
|
p_method_nm = rsp("p_method_nm")
|
|
End if
|
|
End if
|
|
%>
|
|
<td><input type="checkbox" class="none" name="current_p_method_cd" value="<%=rsp("p_method_cd") %>" onClick="chkboxSum(this)"><%=rsp("p_method_nm") %></input></td>
|
|
<% if i mod 5 = 0 then %>
|
|
</tr><tr>
|
|
<% end if
|
|
rsp.movenext
|
|
loop
|
|
rsp.close
|
|
%>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" align="center" class='tit2'>조사내용</td>
|
|
<td colspan="4" class='tit7'>
|
|
<input type="text" name="p_intention" value="" style="width:660;" />
|
|
</td>
|
|
</tr>
|
|
<tr id="tr_p_sub_type">
|
|
<td colspan="6" style="position:relative; padding: 0px 0px 0px 10px; margin: 0px;">
|
|
<span id="p_sub_type_comment"></span>
|
|
<input type="radio" name="p_sub_type_change" value="Y" onclick="select_p_sub_type('<%=p_sn%>','<%=p_sub_type%>')" style="display:none;"/>
|
|
<input type="radio" name="p_sub_type_change" value="N" onclick="select_p_sub_type('<%=p_sn%>','<%=p_sub_type%>')" checked style="display:none;"/>
|
|
<img src='/images/common/Bottom_down.png' style="cursor:pointer; width:20px; position:absolute; top: 0px; right: 0px; display:none; "
|
|
onclick="">
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td rowspan="7" class="tit2">클라이언트</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">회사</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:200;" name="p_cli_company_nm" value="<%=p_cli_company_nm %>" readonly onClick="search('./cli_search_2014.asp','ClientSearch','width=390,height=381,left=100,top=50,scrollbars=yes')" style="cursor:pointer">
|
|
<input type="hidden" name="p_cli_company_cd" value="<%=p_cli_company_cd %>" />
|
|
<input type="hidden" name="p_cli_per_cd" value="<%=p_cli_per_cd %>" />
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">부서</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:300;" name="p_cli_depart" value="<%=p_cli_depart %>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">담당자 이름</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:300;" name="p_cli_per_nm" value="<%=p_cli_per_nm %>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">회사 번호</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:300;" name="p_cli_per_com_tel" value="<%=p_cli_per_com_tel %>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">담당자<br /> 휴대폰</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:300;" name="p_cli_per_tel" value="<%=p_cli_per_tel %>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_client" style="display: none;">
|
|
<td align="center" class="tit2">이메일</td>
|
|
<td class="tit5" colspan="4">
|
|
<input type="text" style="width:300;" name="p_cli_per_email" value="<%=p_cli_per_email %>" readonly>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr><td colspan="6"></td></tr>
|
|
|
|
<tr class="tr_p_detail" style="display: none;">
|
|
<td colspan="2" align="center" class="tit2 tit_right"> 결정 예정일</td>
|
|
<td class="tit5" colspan="4">
|
|
<input class="input" type="text" name="p_decide_date" size="10" value="<%=p_decide_date %>" readonly>
|
|
</td>
|
|
</tr>
|
|
<tr class="tr_p_detail" style="display: none;">
|
|
<td colspan="2" align="center" class="tit2">업종</td>
|
|
<td class="tit5" colspan="4">
|
|
<select name="p_client_type_cd">
|
|
<option value="">선택</option>
|
|
<%
|
|
q = "SELECT * "
|
|
q = q & "FROM T_CLIENT_TYPE_CD "
|
|
|
|
rsp.Open q, adoConn, 1
|
|
if rsp.RecordCount > 0 then
|
|
for i = 1 to rsp.RecordCount
|
|
%>
|
|
<option value="<%=rsp("p_client_type_cd")%>" <% if p_client_type_cd = rsp("p_client_type_cd") then %> selected <% end if %>> <%=rsp("p_client_type_nm")%></option>
|
|
|
|
<%
|
|
rsp.MoveNext
|
|
next
|
|
end if
|
|
rsp.Close
|
|
%>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr><td colspan="6"></td></tr>
|
|
|
|
<tr class="tr_p_detail" style="display: none;">
|
|
<td colspan="2" align="center" class="tit2">비고</td>
|
|
<td class="tit5" colspan="4">
|
|
<textarea style="width:99%;height:60;" name="p_memo"><%=p_memo %></textarea>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr height="20px;"><td colspan="6"></td></tr>
|
|
<td align="center" colspan="6" style="padding:10 0 0 0">
|
|
<img src="/images/project/btn_save.jpg" align="absmiddle" style="cursor:pointer" onClick="subit('<%=p_sn %>','<%=p_sub_type%>')">
|
|
<img src="/images/common/btn_cancel2.jpg" align="absmiddle" style="cursor:pointer" onClick="clsit()">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
var project_subject = "";
|
|
var current_p_sub_type = "";
|
|
var current_p_method_cd = "";
|
|
var add_p_cont_cost_flag = false;
|
|
|
|
$(document).ready(function () {
|
|
cutmenu();
|
|
var pms = document.pms;
|
|
project_subject = pms.p_subject.value;
|
|
$("#tr_p_sub_type").hide();
|
|
select_p_sub_type('<%=p_sn%>', '<%=p_sub_type%>');
|
|
});
|
|
|
|
function chkboxSum(chk) {
|
|
var pms = document.pms;
|
|
checkSum = 0;
|
|
|
|
for (i = 0; i < pms.current_p_method_cd.length; i++) {
|
|
if (pms.current_p_method_cd[i].checked == true) {
|
|
current_p_method_cd = pms.current_p_method_cd[i].value;
|
|
checkSum++;
|
|
}
|
|
}
|
|
if (checkSum > 1) {
|
|
alert("선택은 1개까지만 가능합니다.");
|
|
chk.checked = false;
|
|
return;
|
|
}
|
|
}
|
|
|
|
function select_p_sub_type(p_sn, p_sub_type){
|
|
var pms = document.pms;
|
|
var checkValue;
|
|
checkSum = 0;
|
|
|
|
for (i = 0; i < pms.p_sub_type_change.length; i++) {
|
|
if (pms.p_sub_type_change[i].checked == true) {
|
|
checkValue = pms.p_sub_type_change[i].value;
|
|
checkSum++;
|
|
}
|
|
}
|
|
|
|
if(checkSum > 0){
|
|
if(checkValue == "Y"){
|
|
$("#p_subject").val(project_subject);
|
|
current_p_sub_type = "M"
|
|
}else{
|
|
current_p_sub_type = "C"
|
|
$("#p_subject").val("");
|
|
}
|
|
}else{
|
|
alert("추가할 프로젝트의 조사방법을 선택 하십시오.");
|
|
}
|
|
}
|
|
|
|
function subit(p_sn, p_sub_type){
|
|
var form = document.pms;
|
|
|
|
if(current_p_method_cd == ""){
|
|
alert("프로젝트에 추가할 조사방법을 선택하세요.");
|
|
return false;
|
|
}if(form.p_intention.value == ""){
|
|
alert("추가할 조사 내용을 입력하세요.");
|
|
return false;
|
|
}else if(form.p_subject.value == ""){
|
|
alert("프로젝트명을 입력하세요.");
|
|
form.p_subject.focus();
|
|
return false;
|
|
}else{
|
|
|
|
}
|
|
|
|
if (confirm("프로젝트를 저장 하시겠습니까?")) {
|
|
save(p_sn, p_sub_type);
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
|
|
function save(p_sn, p_sub_type) {
|
|
document.pms.enctype = "application/x-www-form-urlencoded";
|
|
document.pms.encoding = "application/x-www-form-urlencoded";
|
|
document.pms.action = 'project_list2_add_ok_2014.asp';
|
|
|
|
document.pms.current_p_sub_type.value = current_p_sub_type;
|
|
document.pms.current_p_method_cd.value = current_p_method_cd;
|
|
|
|
document.pms.submit();
|
|
}
|
|
|
|
function clsit() {
|
|
window.close();
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" --> |