472 lines
17 KiB
Plaintext
472 lines
17 KiB
Plaintext
<!-- #include virtual = "include/header.asp" -->
|
||
<!-- #include virtual = "include/left.asp" -->
|
||
<%
|
||
dim title
|
||
dim Query
|
||
dim tmpstr2
|
||
dim i
|
||
dim max_cnt '문서내용 테이블에서 원하는 문서를 가져온 갯수
|
||
dim txt_date '출퇴근보고서 작성시 사용되는 시작일자
|
||
dim db_table_name
|
||
dim Currdate
|
||
dim sel_month
|
||
|
||
Currdate = year(date) & "-" & zeroformat(month(date),2) & "-" & zeroformat(day(date),2)
|
||
|
||
db_table_name = "문서내용"
|
||
|
||
title=request("title")
|
||
|
||
txt_date = request("txt_date")
|
||
sel_month = request("sel_month")
|
||
if trim(sel_month) = "" then
|
||
sel_month = mid(date,1,7)
|
||
end if
|
||
|
||
|
||
'문서번호의 년도가 현년도 인것만 보기
|
||
query = "select * from " & db_table_name
|
||
If title = "신규 지출결의서" then
|
||
query = query & " where 문서제목 ='지출결의서' "
|
||
query = query & " and target16 is not null "
|
||
Else
|
||
query = query & " where 문서제목 ='" & title & "' "
|
||
End If
|
||
query = query & " and login_p_no = '" & Session("User_Number") & "'"
|
||
if title = "접대비보고서" then
|
||
query = query & " and (convert(varchar(7), target3) = '" & sel_month & "' "
|
||
else
|
||
query = query & " and (substring(발급일,1,7) = '" & sel_month & "' "
|
||
end if
|
||
query = query & ") and del_yes_no = 'no' order by 문서번호 desc, 발급시각 desc"
|
||
|
||
adors.open query, adoconn, adopenstatic, adlockreadonly
|
||
%>
|
||
<!-- Content Wrapper. Contains page content -->
|
||
<div class="content-wrapper">
|
||
<style>
|
||
button.ui-datepicker-current {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<!-- 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">
|
||
<form name='frm_select' method='post'>
|
||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||
<tr>
|
||
<td class="brown">
|
||
※ <% if title = "접대비보고서" then response.Write "마케팅비" else response.Write title end if%>의 기존 입력 자료를 보여줍니다.<br>
|
||
※ 가장 최근의 것이 맨 위에 있습니다. 즉, 작성일자의 내림차순 소트입니다.<br>
|
||
※ 자신이 작성한 문서만 보입니다.<br>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="padding:0 0 0 20"><%if title = "접대비보고서" then%>접대월별 보기<%else%>작성월별 보기<%end if%>
|
||
<input type="text" name='sel_month' readonly class='selectMonth' style="width:120;text-align:center;" value="<%=sel_month%>" style="CURSOR:pointer;">
|
||
|
||
<%if title = "신규 지출결의서" then%>
|
||
|
||
<input type="radio" class="none" name='cost_type' value='1' checked onclick="" >프로젝트비용
|
||
<input type="radio" class="none" name='cost_type' value='2' onclick="" >일반비용
|
||
<% End If %>
|
||
<button type="button" class="btn btn-sm btn-primary" onclick="change_month('<%=title%>');">검색</button>
|
||
<button type="button" class="btn btn-sm btn-secondary" onclick="goNew();">신규작성</button>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">
|
||
<table class="table table-sm table-sm2 table-bordered table-head tr-colors">
|
||
<%
|
||
if title="휴가원" then%>
|
||
<tr>
|
||
<td align="center" >작성일</td>
|
||
<td align="center" >휴가기간</td>
|
||
<td align="center" >휴가사유</td>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center"><%=adors("발급일")%></td>
|
||
<td align="center"><%=adors("target1")%>∼<%=adors("target2")%></td>
|
||
<td align="center" class="tahoma_blue"><%=adors("target3")%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "휴직계" then%>
|
||
<tr>
|
||
<td align="center" >휴직사유</td>
|
||
<td align="center" >휴직희망일</td>
|
||
<td align="center" >복직희망일</td>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center"><%=adors("target1")%></td>
|
||
<td align="center"><%=adors("target2")%></td>
|
||
<td align="center" class="tahoma_blue"><%=adors("target3")%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "지출결의서" Or title = "신규 지출결의서" or title = "입금결의서" Or title = "예산제어시스템 테스트" then%>
|
||
<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>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center">
|
||
<%tmpstr=adors("target1")
|
||
if tmpstr = "" then
|
||
tmpstr = " "
|
||
end if%>
|
||
<%=tmpstr%>
|
||
</td>
|
||
<td align="center"><%=adors("target3")%></td>
|
||
<td align="center"><%=adors("target4")%></td>
|
||
<td align="center"><%=formatnumber(adors("target5"),0)%></td>
|
||
<td align="center"><%=adors("target6")%></td>
|
||
<td align="center"><%=adors("target8")%></td>
|
||
<td align="center" class="tahoma_blue"><%=adors("print_chk")%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "접대비보고서" then%>
|
||
<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>
|
||
<td align="center" >인쇄여부</td>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center"><a href="javascript:opnMarketing('<%=adors("문서번호")%>')"><%=adors("문서번호")%></a></td>
|
||
<td align="center"><img src="/images/common/btn_reply_del.jpg" onclick="btn_del('<%=adors("문서번호")%>');" style='CURSOR:pointer;' align="absmiddle"></td>
|
||
<td align="center">
|
||
<%tmpstr=adors("target1")
|
||
if tmpstr = "" then
|
||
tmpstr = " "
|
||
end if%>
|
||
<%=tmpstr%>
|
||
</td>
|
||
<td align="center"><%=adors("target3")%></td>
|
||
<td align="center"><%=adors("target15")%></td>
|
||
<td align="center"><%=adors("target4")%></td>
|
||
<td align="center"><%=adors("target5")%></td>
|
||
<td align="center"><%=adors("target9")%></td>
|
||
<td align="center" class="tahoma_blue"><%=adors("print_chk")%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "출퇴근보고서" then%>
|
||
<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>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
tmpstr= ""
|
||
for i=1 to 10
|
||
tmpstr2 = "target" & trim(i)
|
||
if trim(adors(tmpstr2)) = "" or isnull(adors(tmpstr2)) then
|
||
exit for
|
||
end if
|
||
tmpstr2 = replace(adors(tmpstr2),"^^", ", ")
|
||
tmpstr = tmpstr & " " & tmpstr2 & chr(13)
|
||
next
|
||
%>
|
||
<tr>
|
||
<td align="center"><%=adors("발급일")%></td>
|
||
<td align="center"><%=adors("발급시각")%></td>
|
||
<%tmpstr = split(adors("target1"),"^^")
|
||
for i=0 to 5
|
||
if tmpstr(i) = "" then
|
||
tmpstr(i) = " "
|
||
end if
|
||
next
|
||
%>
|
||
<td align="center"><%=tmpstr(0)%></td>
|
||
<td align="center"><%=tmpstr(3)%></td>
|
||
<td align="center"><%=tmpstr(4)%></td>
|
||
<td align="center"><%=tmpstr(5)%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "가지급금지출" or title = "가지급금지출2" or title = "가지급금지출-직접비" then%>
|
||
<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>
|
||
<td align="center" >정산완료</td>
|
||
</tr>
|
||
<%
|
||
if title = "가지급금지출" then
|
||
chk = 2
|
||
elseif title = "가지급금지출2" then
|
||
chk = 3
|
||
elseif title = "가지급금지출-직접비" then
|
||
chk = 4
|
||
end if
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center"><%=adors("발급일")%></td>
|
||
<td align="center"><%=adors("target12")%></td>
|
||
<td align="center"><%=adors("target1")%></td>
|
||
<td align="center"><%=adors("target3")%></td>
|
||
<td align="center"><%=adors("target4")%></td>
|
||
<td align="center"><%=adors("target6")%></td>
|
||
<td align="center"><%=adors("target10")%></td>
|
||
|
||
<td align="center" class=td_center><button type="button" onclick="goPre('<%= adors("문서번호")%>');">작성</button></td>
|
||
<td align="center">
|
||
<select name="part" onChange="workit('<%=title%>', '<%=adors("문서번호")%>', '')">
|
||
<option value="2" <% if adors("part") = "2" then %> selected <% end if %>>
|
||
미완</option>
|
||
<option value="1" <% if adors("part") = "1" then %> selected <% end if %>>
|
||
완료</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
elseif title = "품의서" then%>
|
||
<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>
|
||
</tr>
|
||
<%
|
||
do while not adoRs.eof
|
||
%>
|
||
<tr>
|
||
<td align="center">
|
||
<%tmpstr=adors("target1")
|
||
if tmpstr = "" then
|
||
tmpstr = " "
|
||
end if%>
|
||
<%=tmpstr%>
|
||
</td>
|
||
<td align="center"><%=adors("target3")%></td>
|
||
<td align="center"><%=adors("target4")%></td>
|
||
<td align="center"><%=adors("target5")%></td>
|
||
<td align="center"><%=adors("target6")%></td>
|
||
<td align="center"><%=adors("target8")%></td>
|
||
<td align="center" class="tahoma_blue"><%=adors("print_chk")%></td>
|
||
</tr>
|
||
<%adoRs.movenext
|
||
loop
|
||
End IF
|
||
adoRs.close
|
||
%>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<input type=hidden name=txt_krc_no size=50 value=''>
|
||
<input type=hidden name=txt_title size=50 value='<%=title%>'>
|
||
<input type=hidden name=txt_curr_date size=50 value='<%=date()%>'>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<!-- /.content -->
|
||
<!-- REQUIRED SCRIPTS -->
|
||
<script>
|
||
$(function(){
|
||
currentMenu("/approval/doc_select.asp", "");
|
||
$(".selectMonth").datepicker({
|
||
dateFormat: 'mm-yy',
|
||
changeMonth: true,
|
||
changeYear: true,
|
||
showButtonPanel: true,
|
||
onClose: function(dateText, inst) {
|
||
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
|
||
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
|
||
$(this).val($.datepicker.formatDate('yy-mm', new Date(year, month, 1)));
|
||
change_month('<%= title%>');
|
||
}
|
||
});
|
||
|
||
$(".selectMonth").focus(function () {
|
||
$(".ui-datepicker-calendar").hide();
|
||
$("#ui-datepicker-div").position({
|
||
my: "center top",
|
||
at: "center bottom",
|
||
of: $(this)
|
||
});
|
||
});
|
||
|
||
$(".selectMonth").on('click', function () {
|
||
var selDate = new Date($(".selectMonth").val());
|
||
$("#ui-datepicker-div .ui-datepicker-year option[value='" + selDate.getFullYear() + "']").prop("selected", true);
|
||
$("#ui-datepicker-div .ui-datepicker-month option[value='" + selDate.getMonth() + "']").prop("selected", true);
|
||
});
|
||
|
||
$(".selectDate").datepicker();
|
||
});
|
||
|
||
function goPre(d_no){
|
||
location.href='doc_prepayment2_ex.asp?krc_no='+d_no;
|
||
}
|
||
|
||
function workit(a, b, c){
|
||
document.frm_select.action = "work.asp?title="+a+"&d_no="+b+"&arr="+c;
|
||
document.frm_select.submit();
|
||
}
|
||
|
||
function goNew(){
|
||
var title = document.frm_select.txt_title.value;
|
||
var url;
|
||
|
||
if(title=="휴가원"){
|
||
url ="doc_vacation.asp";
|
||
}else if(title=="Fax_cover"){
|
||
url ="doc_faxcover.asp";
|
||
}else if(title=="협조공문_작성"){
|
||
url ="doc_official.asp";
|
||
}else if(title=="변경신청원"){
|
||
url ="doc_infochange.asp";
|
||
}else if(title=="휴직계"){
|
||
url ="doc_timeoff.asp";
|
||
}else if(title=="복직계"){
|
||
url ="doc_reinstatement.asp";
|
||
}else if(title=="지출결의서" || title=="입금결의서"){
|
||
url ="doc_expense.asp?title=" + title;
|
||
}else if(title=="접대비보고서"){
|
||
url ="doc_entertainment_link.asp";
|
||
}else if(title=="지출정산승인신청서"){
|
||
url ="doc_expense_approval.asp";
|
||
}else if(title=="출퇴근보고서"){
|
||
url ="doc_commute.asp";
|
||
}else if(title=="가지급금지출"){
|
||
url ="doc_prepayment.asp";
|
||
}else if(title=="차량운행일지"){
|
||
url ="doc_cardiary.asp";
|
||
}else if(title=="직접비수정신청서"){
|
||
url ="doc_directcost_modi.asp";
|
||
}else if(title=="교육참가신청서"){
|
||
url ="doc_education.asp";
|
||
}else if(title=="물품구매서"){
|
||
url = "물품구매서.asp";
|
||
} else if (title == "부서비신청서") {
|
||
var sel_date = document.frm_select.sel_month.value;
|
||
url = "doc_expense_approval_depart.asp?txt_date=" + sel_date + "&depart_cost_type=commont_depart";
|
||
}else if(title=="품의서"){
|
||
url ="doc_consultation.asp";
|
||
}else if(title=="출장품의서"){
|
||
url ="doc_business.asp";
|
||
}else if(title=="외주실사의뢰서"){
|
||
url ="doc_field.asp";
|
||
}else if(title=="출장보고서"){
|
||
url ="doc_businessreport.asp";
|
||
}else if(title=="가지급금지출2"){
|
||
url ="doc_prepayment2.asp";
|
||
}else if (title == "신규 지출결의서") {
|
||
var cost_type = 1;
|
||
|
||
$("input[name='cost_type']").each(function (index){
|
||
if($(this).is(":checked") == true){
|
||
cost_type = $(this).val();
|
||
}
|
||
});
|
||
if(cost_type == 1){
|
||
url = "doc_expense_2014.asp?title=지출결의서";
|
||
}else{
|
||
url = "doc_expense2_2014.asp?title=지출결의서";
|
||
}
|
||
}else if (title == "문화체육비신청서") {
|
||
url ="doc_culture_physicaleducation.asp";
|
||
}else if (title == "자금집행서") {
|
||
url ="doc_expense2.asp?title=" + title;
|
||
}else if (title == "면접원수당지출결의서") {
|
||
url ="doc_culture_physicaleducation.asp?krc_no=" + krc_no;
|
||
}
|
||
|
||
document.frm_select.action=url;
|
||
document.frm_select.submit();
|
||
}
|
||
|
||
function btn_del(krc_no){
|
||
// ''선택된 문서 지우기(update 문서내용 del_yes_no = 'yes' where 문서번호 = no)
|
||
var x;
|
||
var txt_title = document.frm_select.txt_title.value;
|
||
var prik = false;
|
||
$("td").each(function(){
|
||
if($(this).text() == krc_no){
|
||
prik = $(this).parent().children("td.tahoma_blue").text() == "No" ? false : true;
|
||
}
|
||
});
|
||
if(txt_title=="접대비보고서" && prik == true){
|
||
alert("인쇄하신 문서는 삭제하실 수 없습니다.");
|
||
return;
|
||
}
|
||
if (confirm("정말로 삭제하시겠습니까?\n\n 삭제한 자료는 복구 불가합니다.") == true){
|
||
window.open('doc_delete.asp?krc_no='+krc_no);
|
||
alert ("삭제 성공");
|
||
location.reload();
|
||
}else{
|
||
alert("삭제 취소입니다");
|
||
}
|
||
}
|
||
|
||
function change_month(title){
|
||
var url;
|
||
var sel_month;
|
||
|
||
sel_month = document.frm_select.sel_month.value;
|
||
|
||
url = "doc_list.asp?title=" + title;
|
||
url = url + "&sel_month=" + sel_month;
|
||
document.frm_select.action=url;
|
||
document.frm_select.submit();
|
||
|
||
}
|
||
|
||
function opnMarketing(krc_no){
|
||
url = "../ess/doc_entertainment_print.asp?d_no=" + krc_no + "&view_chk=1&x=2";
|
||
window.open(url, '', 'left=0,top=0,width=800,height=900,scrollbars=yes,resizable=yes');
|
||
}
|
||
</script>
|
||
</div>
|
||
<!-- /.content-wrapper -->
|
||
<!-- #include virtual = "include/footer.asp" --> |