Files
KIN/project_list/job_cost_project_list_201407.ASP
2025-09-29 17:55:08 +09:00

232 lines
8.3 KiB
Plaintext

<!-- #include file = "../include/default_values.asp" -->
<%'####################################################
'비용 정산을 위해 업무일지에 기록된 프로젝트 리스트를 보여주는 것
'''일반업무는 업무일지의 업무구분 코드를 '99999'으로 구분
'식대 표시 기준(2010년 9월 16일 정리)
'평일에는 택시비-휴일, 식대-저녁(점심), 식대-저녁(휴일), 간식비(휴일) 않되고,
'휴일에는 식대-저녁, 택시비-야근, 간식비(평일) 않됨.
'####################################################
%>
<%
call Time_Check(Session("Login_Check"))
dim Query
dim Max_Width
dim actval
dim actval2
dim actval3
dim actval4
dim part '어디서 왔나
dim condate '해당일자
dim cost_type '비용의 형태(둘다, 프로젝트, 일반)
dim txt_pay_type
dim Max_Col
dim cost_list()
dim cnt, i, j
actval = request("actval")
actval2 = request("actval2")
actval3 = request("actval3")
actval4 = request("actval4")
actval5 = request("actval5")
actval6 = request("actval6")
condate = request("condate")
part = request("part")
cost_type = request("cost_type")
txt_pay_type = request("txt_pay_type")
' Response.Write "actval = '" & actval & "<br>"
' Response.Write "actval2 = '" & actval2 & "<br>"
' Response.Write "actval3 = '" & actval3 & "<br>"
' Response.Write "actval4 = '" & actval4 & "<br>"
' Response.Write "condate = '" & condate & "<br>"
' Response.Write "part = '" & part & "<br>"
' Response.Write "cost_type = '" & cost_type & "<br>"
' Response.Write "txt_pay_type = '" & txt_pay_type & "<br>"
if part = "job_cost_project" then '비용의 프로젝트명 선택시 온다
Query = "select * from job"
Query = Query & " where j_p_no = '" & Session("User_Number") & "'"
Query = Query & " and j_date = '" & condate & "'" '현재 보고자하는 날짜
Query = Query & " and j_p_sn <> '99998' " '개인 용무는 제외
elseif part = "job_cost_category" then '비용항목 선택시 온다
query = "select * from cost_category where (cost_type = 0 or cost_type = " & cost_type & ") and not cost_code in (4, 19) " '' 4 : 면접원식대 제외 '' 19 : 식대 - 출장 제외
if instr(1,txt_pay_type,"평일") > 0 then
query = query & " and not (cost_code = 9 " ''평일에는 식대-저녁(점심) 안되요..
query = query & " or cost_code = 21 " ''평일에는 식대-저녁(휴일) 안되요..
query = query & " or cost_code = 18 " ''평일에는 택시비-주말 안되요..
query = query & " or cost_code = 22 ) " ''평일에는 간식비(휴일) 안되요..
else
query = query & " and not (cost_code = 10 " ''휴일에는 식대-저녁 안되요..
query = query & " or cost_code = 17 " ''휴일에는 택시비-야근 안되요..
query = query & " or cost_code = 1) " ''휴일에는 간식비(평일) 안되요..
end If
query = query & " and cost_code <> 27"
query = query & " and cost_code <> 99"
query = query & " and cost_code not in (3, 2, 28, 90, 6, 30, 29)"
query = query & " order by sort_key"
end if
Response.Write query & "<br>"
adors.Open query, adoconn ,adOpenStatic,adLockReadOnly
Max_Width=770
Max_Col = 3
%>
<script language="javascript">
if (document.all) {
docObj = "document.all."
styleObj = ".style"
} else {
docObj = "document."
styleObj = ""
}
function SendName(j_name, j_pcode, j_detail, j_detail_code, actval,actval2,actval3,actval4,part, job_prj_id) {
var actval5 = '<%=actval5%>';
var actval6 = '<%=actval6%>';
//alert(j_name+", "+j_pcode+", "+j_detail+", "+j_detail_code+", "+actval+", "+actval2+", "+actval3+", "+actval4+", "+part);
eval("opener.document.forms[0]." + actval).value = j_name;
eval("opener.document.forms[0]." + actval2).value = j_pcode;
if (part == "job_cost_project")
{
eval("opener.document.forms[0]." + actval3).value = j_detail;
eval("opener.document.forms[0]." + actval4).value = 5;
eval("opener.document.forms[0]." + actval5).value = j_detail_code;
if(j_detail_code == "Y"){
eval("opener.document.forms[0]." + actval5).checked = true;
}
eval("opener.document.forms[0]." + actval6).value = job_prj_id;
}
else if (part == "job_cost_category")
{ //간식비, 식대-점심(휴일), 식대-저녁,식대-저녁(휴일), 간식비(휴일)
if ((eval(j_pcode) == 1) || (eval(j_pcode) == 9) || (eval(j_pcode) == 10) || (eval(j_pcode) == 21) || (eval(j_pcode) == 22))
{
eval("opener.document.forms[0]." + actval3).style.display="";
eval("opener.document.forms[0]." + actval4).style.display="";
eval("opener.document.forms[0]." + actval3).focus();
}
else
{
eval("opener.document.forms[0]." + actval3).value = ""
eval("opener.document.forms[0]." + actval3).style.display="none";
eval("opener.document.forms[0]." + actval4).style.display="none";
}
}
self.close();
}
function dir_input(actval){
eval("opener.document.forms[0]." + actval).value = "";
// eval("opener.document.forms[0]." + actval).readonly = true;
eval("opener.document.forms[0]." + actval).focus();
self.close();
}
function closeWin(){
self.close();
}
</script>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE>프로젝트 선택</TITLE>
<link rel="StyleSheet" href="/css/basic.css" type="text/css">
</HEAD>
<BODY>
<form name='frmProjectList' method='post' style="TEXT-ALIGN: left" >
<%if part = "job_cost_project" then%>
<table border='3' width='<%=Max_Width%>' bordercolordark="#FFFFFF" cellspacing="0" cellpadding="4" bgcolor=mintcream >
<tr>
<td align=left style='FONT-SIZE:12pt;FONT-WEIGHT: bold' colspan="5">
<b class="tahoma_orange" style="font-size: 14pt;"><%=condate%></b> <b style="font-size: 14pt;"><%=session("loginuser") %></b> 님의 업무일지 내용입니다.
</td>
</tr>
<tr>
<td align=center style='FONT-SIZE:12pt; FONT-WEIGHT: bold; width: 12%'>업무시간</td>
<td align=center style='FONT-SIZE:12pt; FONT-WEIGHT: bold; width: 25%'>업무내용</td>
<td align=center style='FONT-SIZE:12pt; FONT-WEIGHT: bold; width: 10%'>외근유무</td>
<td align=center style='FONT-SIZE:12pt; FONT-WEIGHT: bold; width: 40%'>업무세부내용</td>
<td align=center style='FONT-SIZE:12pt; FONT-WEIGHT: bold; width: 13%'>선택</td>
</tr>
<%do while not adors.EOF%>
<tr bgcolor=white align=center>
<td height='30' align=center>
<p><%=Left(adors("j_time_block_st"), 5)%> ~ <%=Right(adors("j_time_block_end"), 5)%></p>
</td>
<td height='30' align=center>
<p><%=adors("j_p_name")%></p>
</td>
<td height='30' align=center>
<p>
<% If adors("j_work_out") <> "" Then %>
<%= adors("j_work_out") %>
<% Else %>
N
<% End If %>
</p>
</td>
<td height='30' align=center>
<p><%=adors("j_detail2")%></p>
</td>
<td height='30' align=center>
<p>&nbsp;<font color=blue><a href="javascript:SendName('<%=adors("j_p_name")%>','<%=adors("j_p_sn")%>','<%=adors("j_detail2")%>','<%=adors("j_work_out")%>','<%=actval%>','<%=actval2%>','<%=actval3%>','<%=actval4%>','<%=part%>', '<%=adors("id")%>')">선택</a> </font> </p>
</td>
</tr>
<% adors.MoveNext
loop %>
</table>
<%elseif part = "job_cost_category" then%>
<table border='3' width='<%=Max_Width%>' bordercolordark="#FFFFFF" cellspacing="0" cellpadding="4" bgcolor=mintcream >
<tr>
<td align=left colspan=<%=max_col%> style='FONT-SIZE:12pt;FONT-WEIGHT: bold'>
비용항목들입니다. <br><font color=blue>추가로 필요한 항목이 있으면 정보시스템팀에 연락주세요.</font>
</td>
</tr>
<%cnt = 0
cnt = adors.recordcount
redim cost_list(cnt,2)
cnt = 0
do while not adors.EOF
cnt = cnt + 1
cost_list(cnt,1) = adors("cost_name")
cost_list(cnt,2) = adors("cost_code")
adors.movenext
loop
adors.close
for i=1 to cnt%>
<tr bgcolor=white >
<%for j=1 to max_col%>
<td width='<%=100 / max_col%>%' height='30' class=td_center title="<%=cost_list(i,1)%>" style="cursor:pointer" onclick="SendName('<%=cost_list(i,1)%>','<%=cost_list(i,2)%>','','','<%=actval%>','<%=actval2%>','<%=actval3%>','<%=actval4%>','<%=part%>')">
<%=cost_list(i,1)%>
</td>
<%if i = cnt then
exit for
end if
if j <> Max_col then i=i+1
%>
<%next%>
</tr>
<%next%>
</table>
<%end if%>
<br>
<table border='1' width='<%=Max_Width%>' bordercolordark="#FFFFFF" cellspacing="0" cellpadding="4" >
<tr>
<td align=center>
<img src='/images/common/btn_cancel.jpg' title='닫기' style="cursor:pointer" align=middle onclick='closeWin();' >
</td>
</tr>
</table>
</form>
</body>
</html>
<%
nothing
adoConn.Close
%>