Files
KIN/inspection/project_direct_cost_2014.asp
2025-09-29 17:55:08 +09:00

1183 lines
70 KiB
Plaintext

<!-- #include virtual = "include/header.asp" -->
<!-- #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.Expires = 0
'url로 넘어오는 변수값 처리
chk_opt = request("chk_opt")
sc_year = request("sc_year")
sc_month = request("sc_month")
sc_team = request("sc_team")
sc_name = request("sc_name")
sc_method = request("sc_method")
cost_type = request("cost_type")
p_method_cd = trim(request("p_method_cd"))
p_child_sn = request("p_sn")
p_sub_type = request("p_sub_type")
if p_sub_type = "" then
p_sub_type = "C"
end if
if Instr(p_child_sn,"@") > 0 then
list_p_sn = split(p_child_sn,"@")
p_child_sn = list_p_sn(0)
p_sub_type = list_p_sn(1)
end if
if Instr(p_method_cd,"@") > 0 then
list_p_sn = split(p_method_cd,"@")
p_method_cd = list_p_sn(0)
p_child_sn = list_p_sn(1)
end if
if cost_type = "" then
cost_type = "field"
end if
if cost_type = "field" then
cost_type_name = "실사"
elseif cost_type = "research" then
cost_type_name = "연구"
elseif cost_type = "dp" then
cost_type_name = "DP" '##### DP팀의 코딩 Part 직접비 입력 (2018-02-27 김종휘)
else
cost_type_name = "버그....."
end if
sql = "select * from person where p_no = '" & Session("user_number") & "'"
Rs.open sql, adoconn, adopenstatic, adlockreadonly
user_depart = rs("p_depart")
user_team = rs("p_team")
Rs.close
p_sn = trim(request("p_sn"))
p_sn = left(p_sn,7)
query = " SELECT p_sn, p_child_sn, TPM.p_method_cd, TPM.p_progress_status, TPMC.p_method_nm, p_subject, p_sub_type, TPMC.p_method_cd, TPM.p_field_dept, TPM.p_is_dept "
query = query & " FROM T_PROJECT_METHOD TPM LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd "
if p_sub_type = "C" then
query = query & " WHERE p_child_sn = '"& p_child_sn &"' "
elseif p_sub_type = "M" then
query = query & " WHERE p_sn = '"& p_sn &"' "
end if
adors.Open query, adoConn, 1
if cost_type = "research" then
p_method_cd = adors("p_method_cd")
end if
if cost_type = "field" then
p_field_dept = adors("p_field_dept")
end if
if cost_type = "dp" then
p_is_dept = adors("p_is_dept") '##### dp팀(코딩) 2017-02-27 김종휘
end if
adors.Close
if p_sub_type = "M" then
query = " SELECT p_sn "
query = query & " , p_subject "
query = query & " , TCCD_E.c_code_name as p_export_range "
query = query & " , p_cont_cost "
query = query & " FROM T_PROJECT_BASE TPB "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E ON TCCD_E.c_kind_code = '011' AND TPB.p_export_range = TCCD_E.c_common_code"
query = query & " WHERE p_sn = '"& p_sn &"'"
'Response.Write query & "<BR>"
elseif p_sub_type = "C" then
query = " SELECT p_sn "
query = query & " , p_subject "
query = query & " , TCCD_E.c_code_name as p_export_range "
query = query & " , p_cont_cost "
query = query & " FROM T_PROJECT_METHOD TPM "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E ON TCCD_E.c_kind_code = '011' AND TPM.p_export_range = TCCD_E.c_common_code"
query = query & " WHERE p_child_sn = '"& p_child_sn &"'"
'Response.Write query & "<BR>"
end if
AdoRs.Open query,adoconn, 1
p_sn = adors("p_sn")
p_subject = adors.fields("p_subject")
p_export_range = adors("p_export_range")
p_cont_cost = adors("p_cont_cost")
adors.Close
'기본정보 초기값 셋팅
query = " SELECT p_method_cd, TPM.p_sn, p_child_sn, p_sub_type, TCCD_A.c_code_name as p_sur_area, TCCD_T.c_code_name as p_sur_target, TPM.p_sample, p_research_date_st, p_research_date_end, "
query = query & " TCCD_P.c_code_name as p_sur_part, TCCD_F.c_code_name as p_field_process, TPM.p_cont_cost, ISNULL(TCCD_E1.c_code_name,TCCD_E2.c_code_name) as p_export_range "
query = query & " FROM T_PROJECT_METHOD TPM "
query = query & " LEFT OUTER JOIN T_PROJECT_BASE TPB ON TPM.p_sn = TPB.p_sn "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E1 ON TCCD_E1.c_kind_code = '011' AND TPM.p_export_range = TCCD_E1.c_common_code "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_E2 ON TCCD_E2.c_kind_code = '011' AND TPB.p_export_range = TCCD_E2.c_common_code "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_A ON TCCD_A.c_kind_code = '012' AND TPM.p_sur_area = TCCD_A.c_common_code "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_T ON TCCD_T.c_kind_code = '013' AND TPM.p_sur_target = TCCD_T.c_common_code "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_P ON TCCD_P.c_kind_code = '014' AND TPM.p_sur_part = TCCD_P.c_common_code "
query = query & " LEFT OUTER JOIN T_COMMON_CODE_DETAIL TCCD_F ON TCCD_F.c_kind_code = '015' AND TPM.p_field_process = TCCD_F.c_common_code "
'if p_sub_type = "C" then
if len(p_child_sn) > 7 then
query = query & " WHERE TPM.p_child_sn = '"& p_child_sn &"' "
elseif p_sub_type = "M" then
query = query & " WHERE TPM.p_sn = '"& p_sn &"' "
end if
if p_method_cd <> "" then
query = query & " AND TPM.p_method_cd = '"&p_method_cd&"' "
end if
'Response.Write query &"<BR>"
rs.Open query,adoconn, 1
if rs.recordCount > 0 then
p_sur_area = rs("p_sur_area")
p_sur_target = rs("p_sur_target")
If IsNull(rs("p_sample")) Then
p_sample = 0
Else
p_sample = Cdbl(rs("p_sample"))
End if
p_research_date_st = rs("p_research_date_st")
p_research_date_end = rs("p_research_date_end")
p_sur_part = rs("p_sur_part")
p_field_process = rs("p_field_process")
p_child_sn = rs("p_child_sn")
p_sub_type = rs("p_sub_type")
if p_sub_type = "C" Then
If IsNull(rs("p_cont_cost")) Then
p_cont_cost = 0
Else
p_cont_cost = rs("p_cont_cost")
End if
end if
p_export_range = rs("p_export_range")
else
p_sur_area = ""
p_sur_target = ""
p_sample = 1
est_sum = 0
p_research_date_st = ""
p_research_date_end = ""
p_sur_part = ""
p_field_process = ""
p_export_range = ""
end if
rs.close
p_input_complete = "no"
field_sub_complete = ""
query = " SELECT tpm.p_sn, tpm.p_child_sn, p_sub_type, p_input_complete "
if cost_type = "field" then
query = query & " , d_order_cnt, isnull(sv_prog, '') as sv_prog, isnull(qc_prog, '') as qc_prog "
end if
query = query & " FROM T_PROJECT_METHOD tpm "
if cost_type = "field" then
query = query & " left outer join 문서내용 a on tpm.p_child_sn = cast(a.target1 as varchar(20)) and cast(a.target2 as varchar(20)) = 'field' and 문서제목 = '프로젝트수행계획서' and del_yes_no = 'no' "
if p_field_dept <> "8" then
query = query & " and cast(a.target3 as varchar(20)) = 'SV' "
else
query = query & " and cast(a.target3 as varchar(20)) = 'QC' "
end if
query = query & " left outer join Document d on a.문서번호 = d.d_no and d_delok = 'N' "
query = query & " left join direct_cost_field DCF ON tpm.p_child_sn = DCF.p_child_sn AND DCF.del_yn = 'n' "
end if
query = query & " WHERE tpm.p_child_sn = '"& p_child_sn &"' "
if not(p_sub_type = "M" AND cost_type = "research") AND (p_method_cd <> "" or isnull(p_method_cd)) then
query = query & " AND p_method_cd = '"& p_method_cd &"' "
end if
adors.Open query, adoconn, 1
if adors.recordCount > 0 then
if cost_type = "research" then
do while not adors.EOF
if mid(adors("p_input_complete"), 1, 1) = "o" then
p_input_complete = "yes"
end if
adors.movenext
loop
elseif cost_type = "field" then
if mid(adors("p_input_complete"), 2, 1) = "o" or adors("d_order_cnt") <> "99" then
p_input_complete = "yes"
Else
if adors("sv_prog") = "complete" then
field_sub_complete = "SV"
End If
if adors("qc_prog") = "complete" then
if field_sub_complete <> "" Then
field_sub_complete = field_sub_complete & ", "
End If
field_sub_complete = field_sub_complete & "QC"
End If
if p_field_dept = "8" then
if user_team = "8" then
if adors("qc_prog") = "complete" then
p_input_complete = "yes"
End If
End if
Else
if user_team = "8" then
if adors("qc_prog") = "complete" then
p_input_complete = "yes"
End If
Elseif session("p_teamplace") = "0" Then
if adors("sv_prog") = "complete" then
p_input_complete = "yes"
End If
End if
End If
End if
end if
end if
adors.close
query = " SELECT dc1.d_cost_name, dc2.id, dc2.d_cost_name, "&VbCrlf
query = query & " dc.id, dc.p_sn, dc.krc_no, dc.p_subject, dc.p_type_code, dc.hangmok, isnull(dc.sebu, '') as sebu, "&VbCrlf
query = query & " isnull(dc.est_danga,'') as est_danga, isnull(dc.est_bu_or_cnt,'') as est_bu_or_cnt, isnull(dc.est_dosu_or_time,'') as est_dosu_or_time, isnull(dc.est_money,'') as est_money, "&VbCrlf
query = query & " isnull(dc.act_danga,'') as act_danga, isnull(dc.act_bu_or_cnt,'') as act_bu_or_cnt, isnull(dc.act_dosu_or_time,'') as act_dosu_or_time, isnull(dc.act_money,'') as act_money, isnull(dc.cha_money,'') as cha_money, "&VbCrlf
query = query & " dc.memo, dc.confirm_yn, dc.modify_date, dc.modify_time, dc.modify_user, dc.modify_user_code, dc.modify_ip, dc.write_count, "&VbCrlf
query = query & " dc.del_yes_no, dc.del_date, dc.del_time,dc.del_user, dc.del_user_code, dc.del_ip, dc.p_subject_group, dc.p_sn_group, dc.cost_type, dc.p_child_sn "&VbCrlf
query = query & " FROM "&VbCrlf
query = query & " direct_costcode dc1 INNER JOIN direct_costcode dc2 "&VbCrlf
query = query & " ON dc1.d_cost_parents = dc2.d_cost_code AND dc1.d_cost_kind = dc2.d_cost_kind "&VbCrlf
query = query & " left outer join direct_cost dc on dc2.id = dc.hangmok and dc1.d_cost_name = dc.sebu "&VbCrlf
query = query & " and dc.p_sn = '" & p_sn & "' "&VbCrlf
query = query & " AND dc.del_yes_no = 'no' "&VbCrlf
query = query & " AND dc.cost_type = '" & cost_type & "' "&VbCrlf
if LEN(p_child_sn) > 8 then
query = query & " AND dc.p_child_sn = '" & p_child_sn & "' "&VbCrlf
end if
query = query & " AND dc.hangmok NOT IN ('메모', '메모_경영지원실') "&VbCrlf
query = query & " WHERE dc1.d_cost_parents != '0' "&VbCrlf
query = query & " AND dc1.d_cost_kind = '" & cost_type & "' "&VbCrlf
query = query & " AND dc2.d_cost_parents = '0' "&VbCrlf
query = query & " and dc2.d_cost_useyn = 'Y' "&VbCrlf
query = query & " and dc1.d_cost_useyn = 'Y' "&VbCrlf
query = query & " ORDER BY CONVERT(INT,dc2.attribute01), CONVERT(INT,dc1.attribute01) "&VbCrlf
'response.Write query
adors.Open query, adoconn, 1'adOpenStatic,adLockReadOnly
'총 줄수를 저장
line_total = adors.recordcount
redim pay_Array_new(line_total, 14)
'x:순서, y:1:항목, 2:세부내용, 3:예상의 원, 4:예상의 부/명, 5:예상의 도수/시간, 6:예상의 금액,7:실제의 원, 8:실제의 부/명, 9:실제의 도수/시간, 10:실제의 금액,11:실제금액-예상금액의 차이
'0:메모, 13:경영지원실 전용 메모
'각 컬럼의 초기값 설정
for i=1 to line_total
for j=1 to 13
pay_Array_new(i,j) = ""
next
next
i = -1
do while not adors.EOF
txt_p_subject_group = ""
txt_p_sn_group = ""
i = i + 1
if adors("sebu") <> "" then
pay_Array_new(i,1) = adors("hangmok")
pay_Array_new(i,2) = adors("sebu")
pay_Array_new(i,3) = adors("est_danga")
pay_Array_new(i,4) = adors("est_bu_or_cnt")
pay_Array_new(i,5) = adors("est_dosu_or_time")
pay_Array_new(i,6) = adors("est_money")
pay_Array_new(i,7) = adors("act_danga")
pay_Array_new(i,8) = adors("act_bu_or_cnt")
pay_Array_new(i,9) = adors("act_dosu_or_time")
pay_Array_new(i,10) = adors("act_money")
pay_Array_new(i,11) = adors("cha_money")
pay_Array_new(i,12) = adors("memo")
if trim(pay_Array_new(i,6)) = "" then
else
est_sum = cdbl(est_sum) + cdbl(pay_Array_new(i,6)) '예상직접비 누계
end if
if pay_Array_new(i,10) <> "" then
act_sum = cdbl(act_sum) + cdbl(pay_Array_new(i,10)) '실제직접비 누계
end if
end if
adors.movenext
loop
adors.close
query = " SELECT * "
query = query & " FROM direct_cost "
query = query & " WHERE p_sn = '" & p_sn & "' "
query = query & " AND del_yes_no = 'no' "
query = query & " AND cost_type = '" & cost_type & "' "
query = query & " AND p_child_sn = '" & p_child_sn & "' "
query = query & " AND hangmok IN ('메모', '메모_경영지원실') "
query = query & " ORDER BY id "
adors.Open query, adoconn, 1
do while not adors.EOF
if adors("hangmok") = "메모" then
pay_Array_new(0,0) = adors("memo")
elseif adors("hangmok") = "메모_경영지원실" then
pay_Array_new(0,13) = adors("memo")
end if
adors.movenext
loop
adors.close
edit_yes_no = "yes" '기본적으로 처음일때는 수정가능으로 정의
if Len(p_child_sn) > 8 or (p_sub_type = "M" and cost_type = "research") then
query = " SELECT p_input_complete "
query = query & " FROM T_PROJECT_METHOD "
if p_sub_type = "M" and cost_type = "research" and len(p_child_sn) < 8 then
query = query & " WHERE p_sn = '"& p_child_sn &"' "
else
query = query & " WHERE p_child_sn = '"& p_child_sn &"' "
end if
adors.Open query, adoconn, 1
If cost_type_name = "연구" Then
If mid(adoRs("p_input_complete"), 1,1) = "o" Then
p_progress_status = "직접비 예산 입력 완료"
Else
p_progress_status = "직접비 예산 입력 중"
End if
ElseIf cost_type_name = "실사" Then
If mid(adoRs("p_input_complete"), 2,1) = "o" Then
p_progress_status = "직접비 예산 입력 완료"
Else
p_progress_status = "직접비 예산 입력 중"
if field_sub_complete <> "" Then
p_progress_status = p_progress_status & " - " & field_sub_complete & " 입력 완료"
End If
End if
End If
adoRs.close
end if
%>
<form method=post name='frm_direct_cost'>
<!-- 히든될것들 -->
<input type="hidden" name='p_sn' value='<%=p_sn%>' >
<input type="hidden" name='line_total' value='<%=line_total%>' >
<input type="hidden" name="url_posi" value='<%=url_posi%>'>
<input type="hidden" name="p_sample" value='<%=p_sample%>'> <!--유사프로젝트를가져왔나 값넣기-->
<input type="hidden" name="pay_save" value='<%=pay_save%>'>
<input type="hidden" name="prj_get" value=''> <!--유사프로젝트를가져왔나 값넣기-->
<input type="hidden" name="p_cont_cost" value='<%=p_cont_cost%>'> <!--계약액-->
<input type="hidden" name="project_type_code" value='<%=project_type_code%>'> <!--직접비 구분용 조사방법-->
<input type="hidden" name="edit_yes_no" value='<%=edit_yes_no%>'> <!--직접비 구분용 조사방법-->
<input type="hidden" name="sc_year" value='<%=sc_year%>'> <!--직접비 검색조건 계속 가지고 다니기-->
<input type="hidden" name="sc_month" value='<%=sc_month%>'> <!--직접비 검색조건 계속 가지고 다니기-->
<input type="hidden" name="sc_team" value='<%=sc_team%>'> <!--직접비 검색조건 계속 가지고 다니기-->
<input type="hidden" name="sc_name" value='<%=sc_name%>'> <!--직접비 검색조건 계속 가지고 다니기-->
<input type="hidden" name="sc_method" value='<%=sc_method%>'> <!--직접비 검색조건 계속 가지고 다니기-->
<input type="hidden" name="txt_p_sn_group" value='<%=txt_p_sn_group%>' > <!--관련 프로젝트들의 프로젝트 코드-->
<input type="hidden" name="p_child_sn" value='<%=p_child_sn%>' >
<input type="hidden" name ='cost_type' value = '<%=cost_type%>'> <!-- 연구 OR 실사-->
<input type="hidden" name ='p_sub_type' value = '<%=p_sub_type%>'> <!-- M or C 멀티인지 단독인지-->
<input type="hidden" name ='user_team' value = '<%=user_team%>'> <!-- 실사팀인지 QC팀인지 -->
<table>
<tr>
<td>
<table class='table table-sm2 table-bordered'>
<tr>
<td colspan=4 align="left" bgcolor='yellow' style='font-size:13pt;font-weight:bold'><%=cost_type_name%> 부서 관련 직접비 입니다. (<%=p_progress_status %>)</td>
</tr>
<tr>
<td width="15%" class='bg-gray-light text-center'>프로젝트 번호</td>
<td width="15%" ><%=p_child_sn %></td>
<td width="15%" class='bg-gray-light text-center'>프로젝트명</td>
<td><%=p_subject%></td>
</tr>
<tr>
<td width="15%" class='bg-gray-light text-center'>용역범위</td>
<td width="15%" ><%=p_export_range%></td>
<td width="15%" class='bg-gray-light text-center'>조사방법</td>
<td>
<%
query = " SELECT TPM.p_method_cd, p_child_sn, TPMC.p_method_nm, p_sn, p_subject, p_sub_type, TPMC.p_method_cd, p_input_complete, TPM.p_intention "
query = query & " FROM T_PROJECT_METHOD TPM LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd "
if p_sub_type = "C" then
query = query & " WHERE p_child_sn = '"& p_child_sn &"' "
elseif p_sub_type = "M" then
query = query & " WHERE p_sn = '"& p_sn &"' "
end if
adors.Open query, adoConn, 1
'response.write query &" <BR>"
%>
<%=adors("p_method_nm")%>-[<%=adors("p_intention")%>]
<select name="p_method_cd" id = "p_method_cd" onchange="p_method_cd_select()" class='d-none'>
<option value="">선 택</option>
<% for i = 1 to adors.RecordCount %>
<option value="<%=adors("p_method_cd")%>@<%=adors("p_child_sn")%>" <%if p_child_sn = trim(adors("p_child_sn")) then %> selected <%end if %> ><%=adors("p_method_nm")%>-[<%=adors("p_intention")%>]</option>
<%
p_sub_type = adors("p_sub_type")
adors.movenext
next %>
</select>
</td>
</tr>
<% if cost_type = "field" or (cost_type = "research" and p_sub_type = "C") then %>
<tr>
<td width="15%" class='bg-gray-light text-center' >조사지역</td>
<td width="15%" ><%=p_sur_area%></td>
<td width="15%" class='bg-gray-light text-center'>조사대상</td>
<td><%=p_sur_target%></td>
</tr>
<tr>
<td width="15%" class='bg-gray-light text-center'>샘플수</td>
<td width="15%" ><font ><%=formatnumber(p_sample, 0)%></font></td>
<td width="15%" class='bg-gray-light text-center'>조사시간</td>
<td><font ><%=p_research_date_st%>~<%=p_research_date_end%></font></td>
</tr>
<tr>
<td width="15%" class='bg-gray-light text-center'>조사분류</td>
<td width="15%" ><font ><%=p_sur_part %></font></td>
<td width="15%" class='bg-gray-light text-center'>실사수행</td>
<td><font ><%=p_field_process %></font></td>
</tr>
<%
end if
adors.close
%>
</table>
</td>
</tr>
<tr>
<td>
<table id="direct_cost_table" class='table table-sm table-sm2 table-bordered table-head tr-colors'>
<tr>
<td align="center" rowspan="2">항목</td>
<td align="center" rowspan="2">세부내용</td>
<td align="center" colspan="4"><font class="tahoma_white">Estimate Cost</font></td>
<td align="center" rowspan="2">메모</td>
<td align="center" colspan="4"><font class="tahoma_white">Actual Cost</font></td>
<td align="center" rowspan="2">차액(실제-예상)</td>
<td align="center" rowspan="2"><font class="tahoma_white">Action</font></td>
</tr>
<tr>
<td align="center" >원(단가)</td>
<td align="center" >부/명</td>
<td align="center" >배수/시간</td>
<td align="center" >금액</td>
<td align="center" >원(단가)</td>
<td align="center" >부/명</td>
<td align="center" >배수/시간</td>
<td align="center" >금액</td>
</tr>
<tr>
<td colspan="2">
</td>
<td colspan=2 align=center>
<%
if p_input_complete = "yes" then
edit_yes_no = "no"
else
edit_yes_no = "yes"
end if
if edit_yes_no = "yes" then %>
<button type="button" class="btn btn-sm btn-secondary px-3" onclick='go_save("estimate","no");'>임시 저장</button>
<%else%>
&nbsp;
<%end if%>
</td>
<td colspan=2 align=center>
<% if edit_yes_no = "yes" then %>
<% if cost_type = "field" and session("depart_code") = 12 And (session("teamplace") < 3 or session("teamplace") > 7) then ' 실사는 부서장 이상만 버튼 활성화 %>
<% if user_team = "8" then %>
<button type="button" class="btn btn-sm btn-primary px-3" onclick='go_save("estimate","qc");'>입력 완료 (QC)</button>
<% Else %>
<button type="button" class="btn btn-sm btn-primary px-3" onclick='go_save("estimate","sv");'>입력 완료 (SV)</button>
<% End If %>
<% Else %>
<button type="button" class="btn btn-sm btn-primary px-3" onclick='go_save("estimate","yes");'>입력 완료</button>
<% end if %>
<% else %>
<% if cost_type = "field" and session("depart_code") = 12 And (session("teamplace") < 3 or session("teamplace") > 7) then ' 실사는 부서장 이상만 버튼 활성화 %>
<% if user_team = "8" then %>
<% Else %>
<% End If %>
<% else %>
<button type="button" class="btn btn-sm btn-warning px-3" onclick='go_save("estimate","cancle");'>완료 취소</button>
<% end if %>
<% end if %>
</td>
<td align="center" > </td>
<td colspan=4 align=center>
<%if session("Depart_Code") = "18" then %>
<button type="button" class="btn btn-sm btn-success px-3" onclick='go_save("actual","yes");'>전체 저장</button>
<%else%>
&nbsp;
<%end if%>
</td>
<!--전체 차액-->
<td align="center" >
<input type="text" style="width:80;" name='cha_sum' class='number' readonly value='<%=formatnumber(0,0)%>' style="text-align:right">
</td>
<!--항목추가-->
<td align="center" > </td>
</tr>
<%
query = " SELECT H.id as h_id, H.d_cost_code as h_d_cost_code, H.d_cost_parents as h_d_cost_parents, H.d_cost_name as h_d_cost_name, H.d_cost_kind as h_d_cost_kind, H.attribute01 as h_attribute01, "&VbCrlf
query = query & " S.id as s_id, S.d_cost_code as s_d_cost_code, S.d_cost_parents as s_d_cost_parents, S.d_cost_name as s_d_cost_name, S.d_cost_kind as s_d_cost_kind, S.attribute01 as s_attribute01, "&VbCrlf
query = query & " (SELECT COUNT(*) FROM direct_costcode WHERE d_cost_kind = H.d_cost_kind AND d_cost_parents = S.d_cost_parents AND d_cost_useyn = 'Y') as row_cnt " &VbCrlf
query = query & " FROM "&VbCrlf
query = query & " (SELECT id, d_cost_code, d_cost_parents, d_cost_name, d_cost_kind, attribute01 FROM direct_costcode WITH(NOLOCK) WHERE d_cost_parents = '0' AND d_cost_useyn = 'Y') H "&VbCrlf
query = query & " LEFT OUTER JOIN "&VbCrlf
query = query & " (SELECT id, d_cost_code, d_cost_parents, d_cost_name, d_cost_kind, d_cost_useyn, attribute01 FROM direct_costcode WITH(NOLOCK) WHERE d_cost_parents <> '0' AND d_cost_useyn = 'Y') S "&VbCrlf
query = query & " ON H.d_cost_kind = S.d_cost_kind AND H.d_cost_code = S.d_cost_parents "&VbCrlf
query = query & " WHERE H.d_cost_kind = '"& cost_type &"' "&VbCrlf
query = query & " ORDER BY H.d_cost_kind, CONVERT(integer, H.attribute01), CONVERT(integer, S.attribute01) "&VbCrlf
Dim d_cost_name '항목의 rowspan을 주기 위한 변수
'Response.Write query
rs.Open query, adoConn, 1
line_count = 0
d_cost_name = ""
Dim tr_display
Do while Not rs.Eof
if rs("s_d_cost_kind") = "field" and rs("s_d_cost_parents") = "4" and rs("s_d_cost_code") = 1 then
%>
<tr></tr>
<%
end if
if rs("s_d_cost_kind") = "research" and rs("h_d_cost_name") = "진행비" and rs("s_d_cost_name") = "식대" and p_method_cd <> "3" and p_method_cd <> "4" and p_method_cd <> "5" then
tr_display = "none"
else
tr_display = ""
end if
%>
<tr id="<%=rs("s_d_cost_kind")%>_<%=rs("s_d_cost_parents")%>_<%=rs("s_d_cost_code")%>" style="display:<%=tr_display%>;">
<td class='align-middle text-center' <% if d_cost_name <> rs("h_d_cost_name") then %>id="rowspan_<%=rs("h_d_cost_name") %>_<%=rs("s_d_cost_name") %>" <% if rs("h_d_cost_name") = "외주비용" and rs("s_d_cost_kind") = "field" then %> rowspan = "<%=rs("row_cnt")+1 %>" <% else %> rowspan= "<%=iif(rs("s_d_cost_kind") = "research" and rs("h_d_cost_name") = "진행비" and p_method_cd <> "3" and p_method_cd <> "4" and p_method_cd <> "5", cstr(cint(rs("row_cnt"))-1), rs("row_cnt")) %>" <% end if %> <% else %> style="display:none" <% end if %>>
<%= rs("h_d_cost_name") %>
<input type="hidden" name='hangmok' value="<%= rs("h_id") %>">
</td>
<td class='align-middle' style="width:168px" id="<%= rs("h_id") %>_<%= rs("s_d_cost_name") %>">
<input type=hidden name='sebu' value="<%= rs("s_d_cost_name") %>"><%= rs("s_d_cost_name") %> <%if rs("s_d_cost_name") = "출장비" and rs("s_d_cost_kind") = "research" then %><span style="font-size:11px;">&nbsp; (1박 2일 기준 숙박, 교통, 식대)</span><% end if %>
<% if rs("s_d_cost_name") = "면접원수당1" or rs("s_d_cost_name") = "면접원추가(TS)1" or rs("s_d_cost_name") = "서울외주1" or rs("s_d_cost_name") = "지방실사외주_부산1"_
or rs("s_d_cost_name") = "지방실사외주_대전1" or rs("s_d_cost_name") = "지방실사외주_광주1"_
or rs("s_d_cost_name") = "지방실사외주_대구1" or rs("s_d_cost_name") = "지방실사외주_강원1" or rs("s_d_cost_name") = "지방실사외주_제주1" then %>
<i id="btn_<%=rs("s_d_cost_kind")%>_<%=rs("s_d_cost_parents")%>_<%=rs("s_d_cost_code")%>_down" class="float-right fas fa-caret-square-down" onclick='line_show("<%=rs("s_d_cost_kind")%>_<%=rs("s_d_cost_parents")%>_<%=rs("s_d_cost_code")%>");' style=" CURSOR:pointer;"></i>
<i id="btn_<%=rs("s_d_cost_kind")%>_<%=rs("s_d_cost_parents")%>_<%=rs("s_d_cost_code")%>_up" class="float-right fas fa-caret-square-up" onclick='line_hide("<%=rs("s_d_cost_kind")%>_<%=rs("s_d_cost_parents")%>_<%=rs("s_d_cost_code")%>");' style=" CURSOR:pointer;display:none" ></i>
<% end if %>
</td>
<td align="center" >
<input type=text name='est_gap1' <%=disabled%> size=7 onPropertyChange='sum_this("est","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,3) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,3)) end if%>' class='number'
onkeyup='changValues(this,"<%=line_count %>"); sum_this("est","<%=line_count%>","<%=cost_type %>");' />
</td> <!--예상 원-->
<td align="center" >
<input type=text name='est_gap2' <%=disabled%> size=7 onPropertyChange='sum_this("est","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,4) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,4)) end if%>' class='number'
onkeyup='changValues(this,"<%=line_count %>"); sum_this("est","<%=line_count%>","<%=cost_type %>");' />
</td> <!--예상 부/병 -->
<td align="center" >
<input type=text name='est_gap3' <%=disabled%> size=7 onPropertyChange='sum_this("est","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,5) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,5)) end if%>' class='number'
onkeyup='changValues(this,"<%=line_count %>"); sum_this("est","<%=line_count%>","<%=cost_type %>");' />
</td><!-- 예상 배수/시간-->
<td align="center" ><input type=text name='est_gap4' size=12 value='<%if pay_Array_new(line_count,6) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,6)) end if%>' class='number' readonly></td><!-- 예상 금액-->
<td align="center" ><input type=text name='line_memo' value='<%=pay_Array_new(line_count,12)%>' class="number" style="text-align:left;" /></td>
<td align="center" ><input type=text name='act_gap1' size=7 onPropertyChange='sum_this("act","<%=line_count%>","<%=cost_type %>");' onkeyup='changValues(this); sum_this("act","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,7) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,7)) end if%>' class='number'
<%if session("Depart_Code") <> "18" then %> readonly='true' <%end if%> />
</td> <!--실제 원-->
<td align="center" ><input type=text name='act_gap2' size=7 onPropertyChange='sum_this("act","<%=line_count%>","<%=cost_type %>");' onkeyup='changValues(this); sum_this("act","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,8) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,8)) end if%>' class='number'
<%if session("Depart_Code") <> "18" then %> readonly='true' <%end if%> />
</td> <!--실제 부/병 -->
<td align="center" ><input type=text name='act_gap3' size=7 onPropertyChange='sum_this("act","<%=line_count%>","<%=cost_type %>");' onkeyup='changValues(this); sum_this("act","<%=line_count%>","<%=cost_type %>");' value='<%if pay_Array_new(line_count,9) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,9)) end if%>' class='number'
<%if session("Depart_Code") <> "18" then %> readonly='true' <%end if%> />
</td><!-- 실제 배수/시간-->
<td align="center" ><input type=text name='act_gap4' size=12 value='<%if pay_Array_new(line_count,10) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,10)) end if%>' class='number' readonly></td><!-- 실제 금액-->
<td align="center" ><input type=text name='gap_cha' size=12 value='<%if pay_Array_new(line_count,11) <> "" then response.write formatNumberDbl(pay_Array_new(line_count,11)) end if%>' class='number' readonly></td><!-- 실제금액과 예상금액의 차이-->
<td align="center" ><button type="button" class="btn btn-sm btn-danger" onclick='line_del(<%=line_count %>);'>삭제</button></td>
<%
line_count = line_count + 1
d_cost_name = rs("h_d_cost_name")
%>
</tr>
<%
rs.moveNext
Loop
rs.close
%>
<tr>
<td class='align-middle text-center' rowspan="3">계약액</td>
<td class='align-middle text-center' rowspan="3"><b class="tahoma_orange"><%=formatnumber(p_cont_cost,0)%></b> 원<br>(부가세 별도)</td>
<td class='align-middle text-center' colspan="2"><%=cost_type_name%> 직접비</td>
<td class='align-middle text-center' colspan="3"><font ><input type="text" style="width:120;text-align:right" name=estimate_sum value='<%=formatnumber(est_sum,0)%>' readonly>원</td>
<td class='align-middle text-center' colspan="2">직접비</td>
<td class='align-middle text-center' colspan="4"><input type="text" name="actual_sum" style="width:120;text-align:right" value='<%=formatnumber(act_sum,0)%>' readonly>원</td>
</tr>
<tr>
<td class='align-middle text-center' colspan="2"><%=cost_type_name%> 직접비율</td>
<td class='align-middle text-center' colspan="3">
<input name=estimate_proportion type="text" style="width:120;text-align:right"
<% If Cdbl(p_cont_cost) = 0 Then %>
value='0'
<% Else %>
value='<%=formatnumber(est_sum / Cdbl(p_cont_cost) * 100,2)%>'
<% End If %>
readonly>%
</td>
<td class='align-middle text-center' colspan="2">직접비율</td>
<td class='align-middle text-center' colspan="4">
<input type="text" name=actual_proportion style="width:120;text-align:right"
<% If Cdbl(p_cont_cost) = 0 Then %>
value='0'
<% Else %>
value='<%=formatnumber(act_sum / Cdbl(p_cont_cost) * 100,2)%>'
<% End If %>
readonly>%
</td>
</tr>
<tr>
<%
tmp_p_sample = 1
if p_sample = 0 then
tmp_p_sample = 1
else
tmp_p_sample = p_sample
end if
%>
<td class='align-middle text-center' colspan="2">샘플당 직접비</td>
<td class='align-middle text-center' colspan="3"><input name=estimate_sample type="text" style="width:120;text-align:right" value='<%=formatnumber(est_sum / tmp_p_sample,0)%>' readonly>원</td>
<td class='align-middle text-center' colspan="2">샘플당 직접비</td>
<td class='align-middle text-center' colspan="4"><input type="text" name=actual_sample style="width:120;text-align:right" value='<%=formatnumber(act_sum / tmp_p_sample,0)%>' readonly>원</td>
</tr>
<%
if cost_type = "field" then
%>
<tr>
<td class='align-middle text-center'>
메모<br>
<button type="button" class="btn btn-sm btn-default mt-1" onclick="save_memo();">저장</button>
</td>
<td class='align-middle text-center' colspan="12">
<textarea rows=5 cols=80 name='txt_memo' style="width:100%;height:80;"><%=pay_Array_new(0,0)%></textarea>
</td>
</tr>
<%
if session("Depart_Code") = "18" then
%>
<tr>
<td class='align-middle text-center'>메모<br>경영 전용</td>
<td class='align-middle text-center' colspan="12">
<TEXTAREA rows=5 cols=80 name='txt_memo2' style="width:100%;height:80;"><%=pay_Array_new(0,13)%></TEXTAREA>
</td>
</tr>
<%
end if
end if
%>
</table>
</td>
</tr>
</table>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- /.content -->
<!-- REQUIRED SCRIPTS -->
<script>
function sum_this(gubun,line_no,team) {
var line_total = document.frm_direct_cost.line_total.value;
var actual_sum = 0; //실제직접비의 합
var estimate_sum = 0; //예상직접비의 합
var i;
var est_gap1 = 0;
var est_gap2 = 0;
var est_gap3 = 0;
var est_gap4 = 0;
var act_gap1 = 0;
var act_gap2 = 0;
var act_gap3 = 0;
var act_gap4 = 0;
if (gubun == "est") {
est_gap1 = allTrim(document.frm_direct_cost.est_gap1[eval(line_no)].value);
est_gap2 = allTrim(document.frm_direct_cost.est_gap2[eval(line_no)].value);
est_gap3 = allTrim(document.frm_direct_cost.est_gap3[eval(line_no)].value);
if (est_gap1 == "" ){
est_gap1 = "0";
}
if (est_gap2 == "" ){
est_gap2 = "0";
}
if (est_gap3 == "" ){
est_gap3 = "0";
}
est_gap1 = parseFloat(est_gap1.replace(/,/gi, ''));
est_gap2 = parseFloat(est_gap2.replace(/,/gi, ''));
est_gap3 = parseFloat(est_gap3.replace(/,/gi, ''));
est_gap4 = (est_gap1 * est_gap2 * est_gap3).toFixed(0);
document.frm_direct_cost.est_gap4[eval(line_no)].value = commify(est_gap4);
act_gap4 = document.frm_direct_cost.act_gap4[eval(line_no)].value;
if(act_gap4 == "")
{
act_gap4 = "0";
}
act_gap4 = act_gap4.replace(/,/gi, '');
for (i = 0; i < eval(line_total) ; i++) {
if (allTrim(document.frm_direct_cost.est_gap4[i].value) != "") {
var gap = document.frm_direct_cost.est_gap4[i].value;
gap = gap.replace(/,/gi, '');
estimate_sum = eval(estimate_sum) + eval(gap);
}
}
} else {
if(document.frm_direct_cost.act_gap1[eval(1)].readOnly == true){
return false;
}
act_gap1 = allTrim(document.frm_direct_cost.act_gap1[eval(line_no)].value);
act_gap2 = allTrim(document.frm_direct_cost.act_gap2[eval(line_no)].value);
act_gap3 = allTrim(document.frm_direct_cost.act_gap3[eval(line_no)].value);
if (act_gap1 == ""){
act_gap1 = "0";
}
if (act_gap2 == ""){
act_gap2 = "0";
}
if (act_gap3 == ""){
act_gap3 = "0";
}
act_gap1 = parseFloat(act_gap1.replace(/,/gi, ''));
act_gap2 = parseFloat(act_gap2.replace(/,/gi, ''));
act_gap3 = parseFloat(act_gap3.replace(/,/gi, ''));
act_gap4 = (act_gap1 * act_gap2 * act_gap3).toFixed(0);
document.frm_direct_cost.act_gap4[eval(line_no)].value = commify(act_gap4);
est_gap4 = document.frm_direct_cost.est_gap4[eval(line_no)].value;
est_gap4 = est_gap4.replace(/,/gi, '');
for (i=0; i<eval(line_total); i++) {
if(allTrim(document.frm_direct_cost.act_gap4[i].value) != "")
{
var gap = document.frm_direct_cost.act_gap4[i].value;
gap = gap.replace(/,/gi, '');
actual_sum = eval(actual_sum) + eval(gap);
}
}
}
//해당줄의 실제직접비 - 예상직접비
document.frm_direct_cost.gap_cha[eval(line_no)].value = commify(act_gap4 - est_gap4);
var p_sample = document.frm_direct_cost.p_sample.value; //샘플사이즈
var p_cont_cost = document.frm_direct_cost.p_cont_cost.value; //계약액
if (gubun == "est"){
estimate_proportion = estimate_sum / p_cont_cost * 100; //예상직접비의 직접비율
estimate_proportion = estimate_proportion.toFixed(2);
estimate_sample = estimate_sum / p_sample; //예상직접비의 샐플당 직접비
estimate_sample = estimate_sample.toFixed(2);
document.frm_direct_cost.estimate_sum.value = commify(estimate_sum);
document.frm_direct_cost.estimate_proportion.value = estimate_proportion;
document.frm_direct_cost.estimate_sample.value = commify(estimate_sample);
}else{
actual_proportion = actual_sum / p_cont_cost * 100; //예상직접비의 직접비율
actual_proportion = actual_proportion.toFixed(2);
actual_sample = actual_sum / p_sample; //예상직접비의 샐플당 직접비
actual_sample = actual_sample.toFixed(2);
document.frm_direct_cost.actual_sum.value = commify(actual_sum);
document.frm_direct_cost.actual_proportion.value = actual_proportion;
document.frm_direct_cost.actual_sample.value = commify(actual_sample);
}
}
//메모 저장
function save_memo() {//sv메저 저장 전용 : 2010년 7월 6일 생성
document.frm_direct_cost.action = "direct_cost_sv_memo_save_2014.asp";
document.frm_direct_cost.submit();
}
//저장.
function go_save(gubun,complete) {
var line_total = document.frm_direct_cost.line_total.value;
if (gubun == "estimate" && complete == "no"){ //예상직접비저장이면 진짜 저장인지 확인버튼활성화
if (!confirm('저장 하시겠습니까?')) {
return false;
}
}else if (gubun == "estimate" && (complete == "yes" || complete == "sv" || complete == "qc")){ //예상직접비저장이면 진짜 저장인지 확인버튼활성화
if (!confirm('예상 직접비 입력을 완료하시겠습니까?')) {
return false;
}
}else if (gubun == "estimate" && complete == "cancle") { //예상직접비저장이면 진짜 저장인지 확인버튼활성화
if (!confirm('예상 직접비 입력 완료를 취소하시겠습니까?')) {
return false;
}
} else if (gubun == "actual" && complete == "yes") { //실제직접비저장이면 진짜 저장인지 확인버튼활성화
for(i=0;i< line_total ;i++){
if(document.frm_direct_cost.act_gap1[i].value != ""){
if (document.frm_direct_cost.act_gap2[i].value == "" || document.frm_direct_cost.act_gap3[i].value == "" || document.frm_direct_cost.act_gap4[i].value == "") {
alert(i + "번째 줄의 " + document.frm_direct_cost.sebu[i].value + "의\n실제 직접비의 부/명 or 배수/시간 or 금액이\n입력되지 않았습니다.\n\n확인해 주시기 바랍니다. ");
return false;
}
}
}
if (confirm('실제 직접비를 저장하시겠습니까?')) {
for (i = 0; i < line_total; i++) {
if (document.frm_direct_cost.act_gap4[i].value == "NaN") {
alert(i + 1 + "번째 줄의 실제직접비에 숫자만 입력해주세요.");
return false;
}
if (document.frm_direct_cost.est_gap4[i].value == "NaN") {
alert(i + 1 + "번째 줄의 예상직접비에 숫자만 입력해주세요.");
return false;
}
}
}
else {
return false;
}
}
//gubun의 값 => estimate : 예상직접비, actual:실제직접비
//일단 각라인별 값이 제대로 있나 확인하기
var url_posi = document.frm_direct_cost.url_posi.value;
var url = "gubun=" + gubun;
url = url + "&p_sn=" + document.frm_direct_cost.p_sn.value;
url = url + "&line_count=" + document.frm_direct_cost.p_sn.value;
url = url + "&complete=" + complete;
document.frm_direct_cost.action = "direct_cost_save_2014.asp?" + url;
document.frm_direct_cost.submit();
}
function p_method_cd_select() {
if ($('#p_method_cd option:selected').val() == "") {
direct_cost_table.style.visibility = "hidden";
} else {
direct_cost_table.style.visibility = "visible";
var url = "p_sn=" + document.frm_direct_cost.p_child_sn.value;
url = url + "&p_method_cd=" + $('#p_method_cd option:selected').val();
document.frm_direct_cost.action = "project_direct_cost_2014.asp?" + url;
document.frm_direct_cost.submit();
}
}
function line_del(line_count) {
if(document.frm_direct_cost.act_gap4[line_count].value.replace(/,/gi, '')*1 > 0){
alert("지출결의 진행된 항목은 삭제할 수 없습니다.");
return;
}
document.frm_direct_cost.est_gap1[line_count].value = "";
document.frm_direct_cost.est_gap2[line_count].value = "";
document.frm_direct_cost.est_gap3[line_count].value = "";
document.frm_direct_cost.est_gap4[line_count].value = "";
document.frm_direct_cost.act_gap1[line_count].value = "";
document.frm_direct_cost.act_gap2[line_count].value = "";
document.frm_direct_cost.act_gap3[line_count].value = "";
document.frm_direct_cost.act_gap4[line_count].value = "";
document.frm_direct_cost.gap_cha[eval(line_count)].value = "";
}
function line_show(line_id) {
//alert("line_id : " + line_id);
if (line_id == "field_1_1") {
$("#field_1_6").css("display", "");
$("#field_1_7").css("display", "");
$("#field_1_8").css("display", "");
$("#field_1_9").css("display", "");
$("#btn_field_1_1_down").css("display", "none");
$("#btn_field_1_1_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_면접원인건비_면접원수당1").attr("rowSpan");
$("#rowspan_면접원인건비_면접원수당1").attr("rowspan", parseInt(rowspan) + 4);
}
} else if (line_id == "field_1_2") {
$("#field_1_10").css("display", "");
$("#field_1_11").css("display", "");
$("#field_1_12").css("display", "");
$("#field_1_13").css("display", "");
$("#btn_field_1_2_down").css("display", "none");
$("#btn_field_1_2_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_면접원인건비_면접원수당1").attr("rowSpan");
$("#rowspan_면접원인건비_면접원수당1").attr("rowspan", parseInt(rowspan) + 4);
}
} else if (line_id == "field_3_1") {
$("#field_3_2").css("display", "");
$("#field_3_3").css("display", "");
$("#btn_field_3_1_down").css("display", "none");
$("#btn_field_3_1_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_4") {
$("#field_3_5").css("display", "");
$("#field_3_6").css("display", "");
$("#btn_field_3_4_down").css("display", "none");
$("#btn_field_3_4_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_7") {
$("#field_3_8").css("display", "");
$("#field_3_9").css("display", "");
$("#btn_field_3_7_down").css("display", "none");
$("#btn_field_3_7_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_10") {
$("#field_3_11").css("display", "");
$("#field_3_12").css("display", "");
$("#btn_field_3_10_down").css("display", "none");
$("#btn_field_3_10_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_13") {
$("#field_3_14").css("display", "");
$("#field_3_15").css("display", "");
$("#btn_field_3_13_down").css("display", "none");
$("#btn_field_3_13_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_16") {
$("#field_3_17").css("display", "");
$("#field_3_18").css("display", "");
$("#btn_field_3_16_down").css("display", "none");
$("#btn_field_3_16_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
} else if (line_id == "field_3_19") {
$("#field_3_20").css("display", "");
$("#field_3_21").css("display", "");
$("#btn_field_3_19_down").css("display", "none");
$("#btn_field_3_19_up").css("display", "");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) + 2);
}
}
}
function line_hide(line_id) {
if (line_id == "field_1_1") {
$("#field_1_6").css("display", "none");
$("#field_1_7").css("display", "none");
$("#field_1_8").css("display", "none");
$("#field_1_9").css("display", "none");
$("#btn_field_1_1_down").css("display", "");
$("#btn_field_1_1_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_면접원인건비_면접원수당1").attr("rowSpan");
$("#rowspan_면접원인건비_면접원수당1").attr("rowspan", parseInt(rowspan) - 4);
}
} else if (line_id == "field_1_2") {
$("#field_1_10").css("display", "none");
$("#field_1_11").css("display", "none");
$("#field_1_12").css("display", "none");
$("#field_1_13").css("display", "none");
$("#btn_field_1_2_down").css("display", "");
$("#btn_field_1_2_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_면접원인건비_면접원수당1").attr("rowSpan");
$("#rowspan_면접원인건비_면접원수당1").attr("rowspan", parseInt(rowspan) - 4);
}
} else if (line_id == "field_3_1") {
$("#field_3_2").css("display", "none");
$("#field_3_3").css("display", "none");
$("#btn_field_3_1_down").css("display", "");
$("#btn_field_3_1_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_4") {
$("#field_3_5").css("display", "none");
$("#field_3_6").css("display", "none");
$("#btn_field_3_4_down").css("display", "");
$("#btn_field_3_4_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_7") {
$("#field_3_8").css("display", "none");
$("#field_3_9").css("display", "none");
$("#btn_field_3_7_down").css("display", "");
$("#btn_field_3_7_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_10") {
$("#field_3_11").css("display", "none");
$("#field_3_12").css("display", "none");
$("#btn_field_3_10_down").css("display", "");
$("#btn_field_3_10_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_13") {
$("#field_3_14").css("display", "none");
$("#field_3_15").css("display", "none");
$("#btn_field_3_13_down").css("display", "");
$("#btn_field_3_13_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_16") {
$("#field_3_17").css("display", "none");
$("#field_3_18").css("display", "none");
$("#btn_field_3_16_down").css("display", "");
$("#btn_field_3_16_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
} else if (line_id == "field_3_19") {
$("#field_3_20").css("display", "none");
$("#field_3_21").css("display", "none");
$("#btn_field_3_19_down").css("display", "");
$("#btn_field_3_19_up").css("display", "none");
if (userAgent() != "IE") {
rowspan = $("#rowspan_외주비용_서울외주1").attr("rowSpan");
$("#rowspan_외주비용_서울외주1").attr("rowspan", parseInt(rowspan) - 2);
}
}
}
$(document).ready(function () {
$("#field_1_6").css("display", "none");
$("#field_1_7").css("display", "none");
$("#field_1_8").css("display", "none");
$("#field_1_9").css("display", "none");
$("#field_1_10").css("display", "none");
$("#field_1_11").css("display", "none");
$("#field_1_12").css("display", "none");
$("#field_1_13").css("display", "none");
$("#field_3_2").css("display", "none");
$("#field_3_3").css("display", "none");
$("#field_3_5").css("display", "none");
$("#field_3_6").css("display", "none");
$("#field_3_8").css("display", "none");
$("#field_3_9").css("display", "none");
$("#field_3_11").css("display", "none");
$("#field_3_12").css("display", "none");
$("#field_3_14").css("display", "none");
$("#field_3_15").css("display", "none");
$("#field_3_17").css("display", "none");
$("#field_3_18").css("display", "none");
$("#field_3_20").css("display", "none");
$("#field_3_21").css("display", "none");
rowspan = $("#rowspan_면접원인건비_면접원수당1").attr("rowspan");
if (userAgent() != "IE") {
$("#rowspan_면접원인건비_면접원수당1").attr("rowspan", "7");
$("#rowspan_외주비용_서울외주1").attr("rowspan", "7");
}
currentMenu("/inspection/direct_cost_prjSearch_2014.asp", "");
});
function userAgent() {
var browserType = "";
if (navigator.userAgent.indexOf("MSIE") != -1) {
browser = "IE";
return browser;
}
if (navigator.userAgent.indexOf("Firefox") != -1) {
browser = "FF";
return browser;
}
if (navigator.userAgent.indexOf("Mozilla") != -1) {
browser = "MZ";
return browser;
}
if (navigator.userAgent.indexOf("Opera") != -1) {
browser = "OP";
return browser;
}
if (navigator.userAgent.indexOf("Safari") != -1) {
browser = "SF";
return browser;
}
if (navigator.userAgent.indexOf("Mac") != -1) {
browser = "MC";
return browser;
}
browser = "NG";
return browser;
}
function changValues(obj,line) {
var num = obj.value;
num = num.replace(/,/gi, "");
num = commify(num, true);
obj.value = num;
}
</script>
</div>
<!-- /.content-wrapper -->
<!-- #include virtual = "include/footer.asp" -->