660 lines
40 KiB
Plaintext
660 lines
40 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">
|
||
<%
|
||
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 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
|
||
|
||
p_sn = trim(request("p_sn"))
|
||
p_sn = left(p_sn,7)
|
||
|
||
Response.Expires = 0
|
||
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"
|
||
elseif cost_type = "all" then
|
||
cost_type_name = "Àüü"
|
||
else
|
||
cost_type_name = "¹ö±×....."
|
||
end if
|
||
|
||
Dim user_job_part
|
||
sql = "select * from person where p_no = '" & Session("user_number") & "'"
|
||
'Response.Write sql & "<br>"
|
||
Rs.open sql, adoconn, adopenstatic, adlockreadonly
|
||
user_depart = rs("p_depart")
|
||
user_job_part = rs("p_job_part")
|
||
Rs.close
|
||
|
||
query = " SELECT p_sn, p_child_sn, p_subject, TPM.p_method_cd, TPM.p_progress_status, TPMC.p_method_nm, p_subject, p_sub_type, TPMC.p_method_cd "
|
||
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
|
||
adors.Close
|
||
|
||
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>"
|
||
|
||
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, isnull(TPM.p_sample, 0) as 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 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 "rs query : " & 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")
|
||
p_sample = Cdbl(rs("p_sample"))
|
||
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
|
||
p_cont_cost = "0"
|
||
if rs("p_cont_cost") <> "" then
|
||
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
|
||
|
||
|
||
'Á÷Á¢ºñ ÀԷ°ªÀÌ ¾øÀ» °æ¿ì. ÃʱⰪÀ» ¼ÂÆÃÇÑ´Ù. ¾Æ·¡ Äõ¸®´Â ½Ç»ç ºÎ¼ ¼¼ºÎÇ׸ñ °¹¼ö.
|
||
query = " SELECT dc2.d_cost_name as hangmok, dc1.d_cost_name as sebu "
|
||
query = query & " FROM direct_costcode dc1 INNER JOIN direct_costcode dc2 ON dc1.d_cost_parents = dc2.d_cost_code AND dc1.d_cost_kind = dc2.d_cost_kind "
|
||
query = query & " WHERE dc1.d_cost_parents != '0' "
|
||
If cost_type <> "all" Then
|
||
query = query & " AND dc1.d_cost_kind = '"& cost_type &"' "
|
||
End if
|
||
query = query & " AND dc2.d_cost_parents = '0' "
|
||
query = query & " ORDER BY dc1.d_cost_parents, dc1.d_cost_code "
|
||
'Response.Write "rs query : " & query &"<BR>"
|
||
rs.Open query,adoconn, 1
|
||
|
||
'°¢ Ä÷³ÀÇ ÃʱⰪ ¼³Á¤
|
||
for i=1 to line_total
|
||
for j=1 to 11
|
||
pay_Array_new(i,j) = ""
|
||
next
|
||
next
|
||
|
||
query = ""&VbCrlf
|
||
query = query & " SELECT *, isnull(confirm_yn,'N') as confirmYN, "&VbCrlf
|
||
query = query & " tpm.p_sv_1, tpm.p_sv_2, tpm.p_sv_3, tpm.p_sv_4, "&VbCrlf'½Ç»ç(SV)
|
||
query = query & " tpm.p_code_1, tpm.p_code_2, tpm.p_code_3, tpm.p_code_4, "&VbCrlf'ÄÚµù
|
||
query = query & " tpm.p_verify_1, tpm.p_verify_2, tpm.p_verify_3, tpm.p_verify_4, "&VbCrlf'°ËÁõ
|
||
query = query & " tpm.p_punch_1, tpm.p_punch_2, tpm.p_punch_3, tpm.p_punch_4 "&VbCrlf'ÆÝÄ¡
|
||
query = query & " FROM direct_cost dc LEFT OUTER JOIN direct_costcode dcc ON dc.hangmok = dcc.id "&VbCrlf
|
||
query = query & " left outer join T_PROJECT_METHOD tpm on dc.p_child_sn = tpm.p_child_sn "&VbCrlf
|
||
query = query & " WHERE dc.p_sn = '"& p_sn &"' "&VbCrlf
|
||
query = query & " AND del_yes_no = 'no' "&VbCrlf
|
||
query = query & " AND hangmok NOT IN ('¸Þ¸ð','¸Þ¸ð_°æ¿µÁö¿ø½Ç') "&VbCrlf
|
||
If cost_type <> "all" Then
|
||
query = query & " AND (cost_type = '"& cost_type &"' "&VbCrlf
|
||
If cost_type = "research" Then
|
||
query = query & " OR sebu IN ('Àμâºñ(º¸°í¼)','Àμâºñ(Á¦¾È)')) " &VbCrlf
|
||
elseIf cost_type = "field" Then
|
||
query = query & " OR sebu IN ('Àμâºñ(¼³¹®Áö)','Åë½Åºñ')) "&VbCrlf
|
||
Else
|
||
query = query & " ) "&VbCrlf
|
||
End if
|
||
End if
|
||
|
||
if LEN(p_child_sn) > 8 Then
|
||
If InStr(p_child_sn, "_M") > 7 Then
|
||
if cost_type = "research" Then
|
||
query = query & " AND dc.p_child_sn like '" & Left(p_child_sn, 9) & "%' "&VbCrlf
|
||
elseif cost_type = "field" Then
|
||
query = query & " AND dc.p_child_sn = '" & p_child_sn & "' "&VbCrlf
|
||
end if
|
||
Else
|
||
query = query & " AND dc.p_child_sn = '" & p_child_sn & "' "&VbCrlf
|
||
End If
|
||
query = query & " ORDER BY hangmok, dc.p_child_sn "&VbCrlf
|
||
Else
|
||
query = query & " ORDER BY hangmok "&VbCrlf
|
||
end if
|
||
|
||
adors.Open query, adoconn, 1'adOpenStatic,adLockReadOnly
|
||
if adors.recordCount > 0 then
|
||
modifyUser = adors("modify_user")
|
||
p_sv_1 = adors("p_sv_1")
|
||
p_sv_2 = adors("p_sv_2")
|
||
p_sv_3 = adors("p_sv_3")
|
||
p_sv_4 = adors("p_sv_4")
|
||
|
||
p_code_1 = adors("p_code_1")
|
||
p_code_2 = adors("p_code_2")
|
||
p_code_3 = adors("p_code_3")
|
||
p_code_4 = adors("p_code_4")
|
||
|
||
p_verify_1 = adors("p_verify_1")
|
||
p_verify_2 = adors("p_verify_2")
|
||
p_verify_3 = adors("p_verify_3")
|
||
p_verify_4 = adors("p_verify_4")
|
||
|
||
p_punch_1 = adors("p_punch_1")
|
||
p_punch_2 = adors("p_punch_2")
|
||
p_punch_3 = adors("p_punch_3")
|
||
p_punch_4 = adors("p_punch_4")
|
||
end if
|
||
'ÃÑ ÁÙ¼ö¸¦ ÀúÀå
|
||
line_total = adors.recordcount
|
||
redim pay_Array_new(line_total, 13)
|
||
|
||
|
||
if adors.RecordCount > 0 Then
|
||
|
||
redim pay_Array_new(line_total, 16)
|
||
'x:¼ø¼, y:1:Ç׸ñ, 2:¼¼ºÎ³»¿ë, 3:¿¹»óÀÇ ¿ø, 4:¿¹»óÀÇ ºÎ/¸í, 5:¿¹»óÀÇ µµ¼ö/½Ã°£, 6:¿¹»óÀÇ ±Ý¾×,7:½ÇÁ¦ÀÇ ¿ø, 8:½ÇÁ¦ÀÇ ºÎ/¸í, 9:½ÇÁ¦ÀÇ µµ¼ö/½Ã°£, 10:½ÇÁ¦ÀÇ ±Ý¾×,11:½ÇÁ¦±Ý¾×-¿¹»ó±Ý¾×ÀÇ Â÷ÀÌ
|
||
'0:¸Þ¸ð, 12:°æ¿µÁö¿ø½Ç Àü¿ë ¸Þ¸ð, 14:p_child_sn, 15:confirm À¯¹«
|
||
i = -1
|
||
txt_p_subject_group = ""
|
||
txt_p_sn_group = ""
|
||
|
||
do while not adors.EOF
|
||
i = i + 1
|
||
pay_Array_new(i,1) = adors("d_cost_name")'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) = FormatNumber(adors("est_money"),0)
|
||
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) = FormatNumber(adors("act_money"),0)
|
||
pay_Array_new(i,11) = FormatNumber(adors("est_money") - adors("act_money"),0)
|
||
If adors("cost_type") = "research" Then
|
||
pay_Array_new(i,12) = "¿¬±¸"
|
||
ElseIf adors("cost_type") = "field" Then
|
||
pay_Array_new(i,12) = "½Ç»ç"
|
||
elseIf adors("cost_type") = "support" Then
|
||
pay_Array_new(i,12) = "°æ¿µ"
|
||
elseIf adors("cost_type") = "DP" Then
|
||
pay_Array_new(i,12) = "Á¤º¸ºÐ¼®"
|
||
End If
|
||
pay_Array_new(i,14) = adors("p_child_sn")
|
||
pay_Array_new(i,15) = adors("confirmYN")
|
||
pay_Array_new(i,16) = 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
|
||
|
||
|
||
adors.movenext
|
||
loop
|
||
|
||
end if
|
||
adoRs.Close
|
||
|
||
query = " SELECT * "
|
||
query = query & " FROM direct_cost "
|
||
query = query & " WHERE p_sn = '" & p_sn & "' "
|
||
query = query & " AND del_yes_no = 'no' "
|
||
If cost_type <> "all" Then
|
||
query = query & " AND cost_type = '" & cost_type & "' "
|
||
End if
|
||
query = query & " AND p_child_sn = '" & p_child_sn & "' "
|
||
query = query & " AND hangmok IN ('¸Þ¸ð', '¸Þ¸ð_°æ¿µÁö¿ø½Ç') "
|
||
query = query & " ORDER BY id "
|
||
'response.Write query
|
||
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
|
||
rs.close
|
||
|
||
query = "select * from document where d_no = '" & krc_no & "'"
|
||
adoRs.open query, adoconn, 1
|
||
|
||
edit_yes_no = "yes" '±âº»ÀûÀ¸·Î óÀ½À϶§´Â ¼öÁ¤°¡´ÉÀ¸·Î Á¤ÀÇ
|
||
if adoRs.recordcount > 0 then
|
||
if lcase(adoRs("d_delok")) = "y" and (cint(user_depart) = 12 OR cint(user_depart) = 16) then '12, 16Àº ÀÚ·áÁ¶»ç½Ç, QC ÆÀ... Á÷Á¢ºñ ¼öÁ¤À» Àü´ãÇß¾úÀ½.
|
||
edit_yes_no = "yes"
|
||
end If
|
||
end if
|
||
adoRs.close
|
||
|
||
p_cont_cost = cdbl(p_cont_cost)
|
||
%>
|
||
<form method=post name='frm_direct_cost' id="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="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 ='lineNumber' value = ''> <!-- confirmYNÀÇ ÁÙ ¶óÀÎ-->
|
||
<!-- È÷µçµÉ°Íµé -->
|
||
<div id="m_list"></div>
|
||
<table style="width:1180px;">
|
||
<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%> ºÎ¼ °ü·Ã Á÷Á¢ºñ ÀÔ´Ï´Ù.</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
|
||
%>
|
||
<%=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
|
||
%>
|
||
|
||
|
||
<%if admin = "true" then%>
|
||
<tr height=30 bgcolor='yellow'>
|
||
<td width=100% colspan=4 >¡Ø ÇöÀç ÁøÇà ´Ü°è(Actual ÀԷ°¡´ÉÀÚ¸¸ º¸ÀÓ) : <%=ing_stat%> </td>
|
||
</tr>
|
||
<%end if%>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding:10 0 0 0;">
|
||
<table id="direct_cost_table" class='table table-sm table-sm2 table-bordered table-head tr-colors'>
|
||
<tr>
|
||
<td class='align-middle text-center' rowspan="2">Ç׸ñ</td>
|
||
<td class='align-middle text-center' rowspan="2">¼¼ºÎ³»¿ë</td>
|
||
<td class='align-middle text-center' colspan="4"><font class="tahoma_white">Estimate Cost</font></td>
|
||
<td class='align-middle text-center' style="width:200px;"></td>
|
||
<td class='align-middle text-center' colspan="4"><font class="tahoma_white">Actual Cost</font></td>
|
||
<td class='align-middle text-center' rowspan="2">Â÷¾×(½ÇÁ¦-¿¹»ó)</td>
|
||
<td class='align-middle text-center' rowspan="2"><font class="tahoma_white">Action</font></td>
|
||
</tr>
|
||
<tr>
|
||
<td class='align-middle text-center' >¿ø(´Ü°¡)</td>
|
||
<td class='align-middle text-center' >ºÎ/¸í</td>
|
||
<td class='align-middle text-center' >µµ¼ö/½Ã°£</td>
|
||
<td class='align-middle text-center' >±Ý¾×</td>
|
||
<td class='align-middle text-center'>¸Þ¸ð</td>
|
||
<td class='align-middle text-center' >¿ø(´Ü°¡)</td>
|
||
<td class='align-middle text-center' >ºÎ/¸í</td>
|
||
<td class='align-middle text-center' >µµ¼ö/½Ã°£</td>
|
||
<td class='align-middle text-center' >±Ý¾×</td>
|
||
</tr>
|
||
<% for i=0 to line_total-1
|
||
pay_Array_new(i,7) = ""
|
||
pay_Array_new(i,8) = ""
|
||
pay_Array_new(i,9) = ""
|
||
%>
|
||
<tr>
|
||
<!-- (2014-05-13)save½Ã hangmokÇ×À» ÀúÀåÇϱâ À§ÇØ hiddenÀ¸·Î hangmokÀ» ¸¸µë -->
|
||
<td class='align-middle text-center'><span class="field_hangmok"><%=pay_Array_new(i,1)%></span></td> <!-- Ç׸ñ -->
|
||
<%If (Session("Depart_Code") = "12" or Session("Depart_Code") = "18") and (pay_Array_new(i,1)= "¸éÁ¢¿øÀΰǺñ" or pay_Array_new(i,1)= "ÀÚ·á󸮺ñ¿ë") Then %>
|
||
<td class='align-middle text-center'><span class="field_sebu" style="cursor:pointer;"><%=pay_Array_new(i,2)%></span></td> <!-- ¼¼ºÎ -->
|
||
<%Else %>
|
||
<td class='align-middle text-center'><%=pay_Array_new(i,2)%></td> <!-- ¼¼ºÎ -->
|
||
<%End If %>
|
||
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,3) <> "" then response.write FormatNumber(pay_Array_new(i,3) ,0) end if%></td> <!-- ¿¹»ó ¿ø(´Ü°¡) -->
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,4) <> "" then response.write FormatNumber(pay_Array_new(i,4) ,0) end if%></td> <!-- ¿¹»ó ºÎ/¸í -->
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,5) <> "" then response.write FormatNumber(pay_Array_new(i,5) ,2) end if%></td> <!-- ¿¹»ó µµ¼ö/½Ã°£ -->
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,6) <> "" then response.write FormatNumber(pay_Array_new(i,6) ,0) end if%></td> <!-- ¿¹»ó ±Ý¾× -->
|
||
|
||
<td align="left" ><%= pay_Array_new(i,16)%></td> <!-- ¸Þ¸ð -->
|
||
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,7) <> "" then response.write FormatNumber(pay_Array_new(i,7) ,0) end if%></td> <!-- ½ÇÁ¦ ¿ø(´Ü°¡) -->
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,8) <> "" then response.write FormatNumber(pay_Array_new(i,8) ,0) end if%></td> <!-- ½ÇÁ¦ ºÎ/¸í -->
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,9) <> "" then response.write FormatNumber(pay_Array_new(i,9) ,0) end if%></td> <!-- ½ÇÁ¦ µµ¼ö/½Ã°£ -->
|
||
<%If (Session("Depart_Code") = "12" or Session("Depart_Code") = "18") and (pay_Array_new(i,1)= "¸éÁ¢¿øÀΰǺñ" or pay_Array_new(i,1)= "ÀÚ·á󸮺ñ¿ë") Then %>
|
||
<td class='align-middle text-center'><span class="act_cost"><%if pay_Array_new(i,10) <> "" then response.write FormatNumber(pay_Array_new(i,10) ,0) end if%></span></td> <!-- ½ÇÁ¦ ±Ý¾× -->
|
||
<%Else %>
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,10) <> "" then response.write FormatNumber(pay_Array_new(i,10) ,0) end if%></td> <!-- ½ÇÁ¦ ±Ý¾× -->
|
||
<%End If %>
|
||
<td class='align-middle text-center'><%if pay_Array_new(i,11) <> "" then response.write FormatNumber(pay_Array_new(i,11) ,0) end if%></td> <!-- ½ÇÁ¦ Â÷¾× -->
|
||
<td class='align-middle text-center'>
|
||
<%
|
||
'Response.Write Session("Depart_Code")
|
||
'if pay_Array_new(i,12) = "½Ç»ç" and Session("Depart_Code") = "12" and _
|
||
'##### DP ÄÚµù ÆÄÆ® Ãß°¡ (2018-02-22) ±èÁ¾ÈÖ
|
||
'##### p_code_1="20150810"(ÀÓ½ÃÀûÀ¸·Î °ø¹Ì¾Ö ÆÀÀå´Ô Ãß°¡ ÃßÈÄ »èÁ¦ - 20180223 ±èÁ¾ÈÖ)
|
||
'##### ÄÚµù -> ½Ç»ç ´ã´ç (2018-11) Hwi
|
||
if pay_Array_new(i,12) = "½Ç»ç" and Session("Depart_Code") = "12" and _
|
||
(trim(Session("User_Number")) = p_sv_1 or trim(Session("User_Number")) = p_sv_2 or trim(Session("User_Number")) = p_sv_3 or trim(Session("User_Number")) = p_sv_4 _
|
||
or trim(Session("User_Number")) = p_code_1 or p_code_1="20181009" or trim(Session("User_Number")) = p_code_2 or trim(Session("User_Number")) = p_code_3 or trim(Session("User_Number")) = p_code_4 _
|
||
or trim(Session("User_Number")) = p_verify_1 or trim(Session("User_Number")) = p_verify_2 or trim(Session("User_Number")) = p_verify_3 or trim(Session("User_Number")) = p_verify_4 _
|
||
or trim(Session("User_Number")) = p_punch_1 or trim(Session("User_Number")) = p_punch_2 or trim(Session("User_Number")) = p_punch_3 or trim(Session("User_Number")) = p_punch_4 _
|
||
or trim(Session("teamplace")) >= 3 ) then %>
|
||
<% if pay_Array_new(i,12) = "½Ç»ç" and Session("Depart_Code") = "12" and trim(Session("teamplace")) >= 3 then %>
|
||
<button type="button" name="confirmN" id="confirmN_<%=i %>" value="N" <% if pay_Array_new(i,15) = "N" then %> style="display :none" <% end if %> onclick="confirmYN('<%=pay_Array_new(i,1)%>','<%=pay_Array_new(i,2)%>','N','<%=i %>')">Ãë¼Ò</button>
|
||
<% else %>
|
||
<!--<input type="text" name="confirmN" id="confirmN_<%=i %>" value="È®ÀεÊ" <% if pay_Array_new(i,15) = "N" then %> style="display :none" <% end if %> />-->
|
||
<b name="confirmN" id="confirmN_<%=i %>" <% if pay_Array_new(i,15) = "N" then %> style="display :none;" <% end if %>>È®ÀÎ ¿Ï·á</b>
|
||
<% end if %>
|
||
<button type="button" name="confirmY" id="confirmY_<%=i %>" value="Y" <% if pay_Array_new(i,15) = "Y" then %> style="display :none" <% end if %>onclick="confirmYN('<%=pay_Array_new(i,1)%>','<%=pay_Array_new(i,2)%>','Y',<%=i %>)">È®ÀÎ</button>
|
||
<%
|
||
end if
|
||
If cost_type = "all" Then
|
||
%>
|
||
<%=pay_Array_new(i,12)%>
|
||
<%
|
||
If InStr(p_child_sn, "_M") > 7 And pay_Array_new(i,12) = "½Ç»ç" then
|
||
%>
|
||
(<%=pay_Array_new(i,14)%>)
|
||
<%
|
||
End if
|
||
End If
|
||
%>
|
||
</td>
|
||
</tr>
|
||
<%
|
||
NEXT
|
||
%>
|
||
<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" value='<%if p_cont_cost <> 0 then response.write formatnumber(est_sum / p_cont_cost * 100,2) else response.write "0" 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" value='<%if p_cont_cost <> 0 then response.write formatnumber(act_sum / p_cont_cost * 100,2) else response.write "0" end if%>' readonly>%</td>
|
||
</tr>
|
||
<tr>
|
||
<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='<%if p_sample <> 0 then %><%=formatnumber(est_sum / p_sample,0)%><%else %>0<%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_sample style="width:120;text-align:right" value='<%if p_sample <> 0 then %><%=formatnumber(act_sum / p_sample,0)%><%else %>0<%end if %>' readonly>¿ø</td>
|
||
</tr>
|
||
<%if cost_type = "field" Or cost_type = "all" then%>
|
||
<tr>
|
||
<td class='align-middle text-center'>¸Þ¸ð<br>
|
||
<img src="/images/project/btn_ssave.gif" title='¸Þ¸ðÀúÀå' onclick="save_memo();" style='cursor:pointer' align="absmiddle">
|
||
</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 admin = "true" then%>
|
||
<tr>
|
||
<td class='align-middle text-center'>MEMO<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 save_memo() {//sv¸ÞÀú ÀúÀå Àü¿ë : 2010³â 7¿ù 6ÀÏ »ý¼º
|
||
document.frm_direct_cost.action = "/inspection/direct_cost_sv_memo_save_2014.asp?ref=" + encodeURIComponent(window.location.href);
|
||
document.frm_direct_cost.submit();
|
||
}
|
||
|
||
function p_method_cd_select() {
|
||
if ($('#p_method_cd option:selected').val() == "") {
|
||
direct_cost_table.style.visibility = "hidden";
|
||
} else {
|
||
//alert($('#p_child_sn option:selected').val());
|
||
direct_cost_table.style.visibility = "visible";
|
||
var url = "p_sn=" + document.frm_direct_cost.p_sn.value;
|
||
url = url + "&p_method_cd=" + $('#p_method_cd option:selected').val();
|
||
|
||
document.frm_direct_cost.action = "direct_cost_print_2014.asp?" + url;
|
||
document.frm_direct_cost.submit();
|
||
}
|
||
|
||
}
|
||
|
||
function confirmYN(hangmok, sebu, yn, i) {
|
||
p_child_sn = document.frm_direct_cost.p_child_sn.value;
|
||
cost_type = document.frm_direct_cost.cost_type.value;
|
||
document.frm_direct_cost.lineNumber.value = i;
|
||
ajaxCallJson("direct_cost_ajax_confirm.asp?hangmok=" + hangmok + "&sebu=" + sebu, { p_child_sn: p_child_sn, cost_type: cost_type, confirmYN: yn }, null, "post", "confrimYNResult()");
|
||
|
||
}
|
||
function confrimYNResult() {
|
||
lineNumber = document.frm_direct_cost.lineNumber.value
|
||
if (ajaxResponse == "Y_OK") {
|
||
$("#confirmY_" + lineNumber).css("display", "none");
|
||
$("#confirmN_" + lineNumber).css("display", "inline");
|
||
}else {
|
||
$("#confirmY_" + lineNumber).css("display", "inline");
|
||
$("#confirmN_" + lineNumber).css("display", "none");
|
||
}
|
||
}
|
||
|
||
$(function () {
|
||
cutmenu(); /// ÆË¾÷¿ëÀ¸·Î ¸¸µé±â
|
||
|
||
var url;
|
||
var p_sn = "<%=p_child_sn %>";
|
||
var sebu_name;
|
||
$(".field_sebu").each(function (i) {
|
||
if ($(".act_cost:eq(" + i + ")").text() != "0") {
|
||
$(".field_sebu:eq(" + i + ")").css("color", "red");
|
||
} else {
|
||
$(".field_sebu:eq(" + i + ")").css("color", "black");
|
||
}
|
||
|
||
$(".field_sebu:eq(" + i + ")").click(function () {
|
||
if ($(this).parent("td").prev().text() == "¸éÁ¢¿øÀΰǺñ" || $(this).parent("td").prev().text() == "ÀÚ·á󸮺ñ¿ë") {
|
||
if ($(".act_cost:eq(" + i + ")").text() == "0") {
|
||
alert("ÁöÃâµÈ ±Ý¾×ÀÌ ¾ø½À´Ï´Ù.");
|
||
return false;
|
||
} else {
|
||
url = "direct_cost_print_2014_ajax.asp?p_sn=" + p_sn + "&sebu_name=" + $(this).text() + "&sebu_hangmok=" + $(this).parent("td").prev().text();
|
||
$("#m_list").dialog({
|
||
autoOpen: false,
|
||
modal: true,
|
||
resizable: false,
|
||
position: { my: "center", at: "top" },
|
||
show: "blind",
|
||
width: "800",
|
||
height: "auto",
|
||
title: "¸éÁ¢¿ø/³»±ÙÁ÷ ¸®½ºÆ®",
|
||
open: function () {
|
||
$(".ui-widget-overlay").css({
|
||
opacity: 0.5,
|
||
filter: "Alpha(Opacity=50)",
|
||
backgroundColor: "gray"
|
||
});
|
||
},
|
||
close: function (event, ui) {
|
||
$("body").css({
|
||
overflow: 'inherit'
|
||
});
|
||
url = "";
|
||
$("#m_list").dialog("close");
|
||
}
|
||
});
|
||
$("#m_list").load(url, function () {
|
||
$("#m_list").dialog("open");
|
||
});
|
||
}
|
||
}
|
||
});
|
||
});
|
||
});
|
||
</script>
|
||
</div>
|
||
<!-- /.content-wrapper -->
|
||
<!-- #include virtual = "include/footer.asp" --> |