최초커밋
This commit is contained in:
202
approval/doc_commute.asp
Normal file
202
approval/doc_commute.asp
Normal file
@@ -0,0 +1,202 @@
|
||||
<!-- #include virtual = "include/header.asp" -->
|
||||
<!-- #include virtual = "include/left.asp" -->
|
||||
<%
|
||||
dim Query
|
||||
dim i, j
|
||||
dim user_name(4) '<27><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0:<3A><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>, 1:<3A≯<EFBFBD>,2:<3A><><EFBFBD><EFBFBD>,3:<3A><>ȭ<EFBFBD><C8AD>ȣ, 4:<3A>μ<EFBFBD><CEBC>ڵ<EFBFBD>(<28><>)
|
||||
dim title
|
||||
dim Company(6)
|
||||
|
||||
title="<22><> <20><> <20><> <20><> <20><> <20><>"
|
||||
''//===============
|
||||
''ȸ<><C8B8> ȸ<><C8B8><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ, <20><>ǥ<EFBFBD>ڸ<EFBFBD>, <20>ּ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
Query = "select * from company"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
Company(1) = adors("com_name")
|
||||
Company(2) = adors("<22><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD><DAB5>Ϲ<EFBFBD>ȣ")
|
||||
Company(3) = adors("<22><>ǥ<EFBFBD>ڸ<EFBFBD>")
|
||||
Company(4) = adors("<22>ּ<EFBFBD>")
|
||||
Company(5) = adors("<22><><EFBFBD>ε<EFBFBD><CEB5>Ϲ<EFBFBD>ȣ")
|
||||
Company(6) = adors("ȸ<><C8B8><EFBFBD><EFBFBD>ǥ<EFBFBD><C7A5>ȭ<EFBFBD><C8AD>ȣ")
|
||||
adoRs.close
|
||||
|
||||
''///===============
|
||||
''<27>α<EFBFBD><CEB1><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
user_name(0) = Session("User_Number")
|
||||
Query = "SELECT p_name, p_team_name, p_rank_name, p_tel3 FROM project2.dbo.V_Person WHERE p_no = '" & user_name(0) & "'"
|
||||
adoRs.open Query, adoconn,adopenstatic, adlockreadonly
|
||||
user_name(1) = adoRs("p_name") '<27≯<EFBFBD>
|
||||
user_name(2) = adoRs("p_rank_name") '<27><><EFBFBD><EFBFBD> <20>ڵ<EFBFBD>
|
||||
user_name(3) = adoRs("p_tel3") '<27><><EFBFBD><EFBFBD> <20><>ȭ
|
||||
user_name(4) = adoRs("p_team_name") '<27>μ<EFBFBD><CEBC>ڵ<EFBFBD>
|
||||
adoRs.close
|
||||
%>
|
||||
<link rel="stylesheet" href="//cdn.rawgit.com/fgelinas/timepicker/master/jquery.ui.timepicker.css">
|
||||
<script src='//cdn.rawgit.com/fgelinas/timepicker/master/jquery.ui.timepicker.js'></script>
|
||||
<style>
|
||||
.ui-timepicker { font-size: 12px; width: auto; }
|
||||
.ui-timepicker-table td a{ width: auto; }
|
||||
</style>
|
||||
<!-- Content Wrapper. Contains page content -->
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<div class="content-header">
|
||||
<h1><3E><><EFBFBD><EFBFBD> <20>ۼ<EFBFBD></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 method='post' name='frm_in_out_time'>
|
||||
<table cellpadding="0" cellspacing="0" style="border-collapse:collapse;width:1000px;" >
|
||||
<tr>
|
||||
<td>
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD>ٺ<EFBFBD><D9BA><EFBFBD><EFBFBD><EFBFBD> <20>ۼ<EFBFBD><DBBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-sm table-sm2 table-bordered table-head">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center" rowspan="2"><3E><><EFBFBD><EFBFBD></th>
|
||||
<th class="text-center" colspan="2"><3E>ý<EFBFBD><C3BD>ۻ<EFBFBD></th>
|
||||
<th class="text-center" rowspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD></th>
|
||||
<th class="text-center" rowspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD></th>
|
||||
<th class="text-center" rowspan="2"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD></th>
|
||||
<th class="text-center" rowspan="2"> </th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD></th>
|
||||
<th class="text-center"><3E><><EFBFBD><EFBFBD></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% for i=1 To 5 %>
|
||||
<tr>
|
||||
<td><input type="text" class="form-control text-center selectDate" readonly name="txt_date_<%=i%>" value="" style="cursor:pointer;"/></td>
|
||||
<td><input type="text" class="form-control text-center" readonly name="txt_in_time_1_<%=i%>" value="" /></td>
|
||||
<td><input type="text" class="form-control text-center" readonly name="txt_out_time_1_<%=i%>" value="" /></td>
|
||||
<td style="width:400px;"><input type="text" class="form-control" name="txt_reason_<%=i%>" value=""/></td>
|
||||
<td><input type="text" class="form-control text-center selectTime" readonly name="txt_in_time_2_<%=i%>" value="" style="cursor:pointer;" /></td>
|
||||
<td><input type="text" class="form-control text-center selectTime" readonly name="txt_out_time_2_<%=i%>" value="" style="cursor:pointer;" /></td>
|
||||
<td><button type="button" class="btn btn-danger btn-sm" id="btn_delrow_<%=i%>" style="width:80px;"><3E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></button></td>
|
||||
</tr>
|
||||
<% Next %>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-center">
|
||||
<button type="button" class="btn btn-success" onclick="goPrint();"><3E>ۼ<EFBFBD><DBBC>ϱ<EFBFBD></button>
|
||||
<button type="button" class="btn btn-info" onclick="history.back(-1);"><3E><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD></button>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.content -->
|
||||
<!-- REQUIRED SCRIPTS -->
|
||||
<script>
|
||||
$(function(){
|
||||
currentMenu("/approval/doc_select.asp", "");
|
||||
|
||||
$(".selectDate").datepicker({
|
||||
onSelect: function() {
|
||||
$(this).change();
|
||||
}
|
||||
});
|
||||
|
||||
$('.selectTime').timepicker();
|
||||
|
||||
$(".selectDate").on("change", function(){
|
||||
var selDate = $(this).val();
|
||||
var resultTime = {};
|
||||
$.ajax({
|
||||
url: "./doc_commute_ajax.asp",
|
||||
type: "POST",
|
||||
data: {"seldate":selDate},
|
||||
async: false,
|
||||
success: function(response, textStatus, jqXHR){
|
||||
resultTime = JSON.parse(response);
|
||||
},error:function(){
|
||||
alert("Web Service Error.");
|
||||
}
|
||||
});
|
||||
$(this).closest("tr").find("input[name^=txt_in_time_1_]").val(resultTime.inTime || "");
|
||||
$(this).closest("tr").find("input[name^=txt_out_time_1_]").val(resultTime.outTime || "");
|
||||
});
|
||||
|
||||
$("button[id^=btn_delrow_]").on("click", function(){
|
||||
var rown = $(this).attr("id").split("_")[2];
|
||||
$("input[name=txt_date_" + rown + "]").val("");
|
||||
$("input[name=txt_in_time_1_" + rown + "]").val("");
|
||||
$("input[name=txt_out_time_1_" + rown + "]").val("");
|
||||
$("input[name=txt_reason_" + rown + "]").val("");
|
||||
$("input[name=txt_in_time_2_" + rown + "]").val("");
|
||||
$("input[name=txt_out_time_2_" + rown + "]").val("");
|
||||
});
|
||||
});
|
||||
|
||||
function goPrint(){
|
||||
var chk = true;
|
||||
var selDateChk = false;
|
||||
$.each($("input[name^=txt_in_time_2_]"), function(i, ele){
|
||||
var selDate = $("input[name=txt_date_"+(i+1)+"]").val();
|
||||
var txt_in_time = $(ele).val();
|
||||
var txt_out_time = $("input[name=txt_out_time_2_"+(i+1)+"]").val();
|
||||
|
||||
if(selDate != "" && (txt_in_time == "" || txt_out_time == "")){
|
||||
alert("<22><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ð<EFBFBD><C3B0><EFBFBD> <20><><EFBFBD><EFBFBD> <20>Է<EFBFBD><D4B7><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
chk = false;
|
||||
return false;
|
||||
}
|
||||
if(selDate == "" && (txt_in_time != "" || txt_out_time != "")){
|
||||
alert("<22><><EFBFBD>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
chk = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
var convInTime = +(txt_in_time.replace(":", "")) < 600 ? 2400 + (txt_in_time.replace(":", "")) : +(txt_in_time.replace(":", ""));
|
||||
var convOutTime = +(txt_out_time.replace(":", "")) < 600 ? 2400 + (txt_out_time.replace(":", "")) : +(txt_out_time.replace(":", ""));
|
||||
|
||||
if(selDate != "" && convInTime > convOutTime){
|
||||
alert("<22><><EFBFBD>ٽð<D9BD><C3B0><EFBFBD> <20><><EFBFBD>ٽð<D9BD><C3B0><EFBFBD><EFBFBD><EFBFBD> <20>ʽ<EFBFBD><CABD>ϴ<EFBFBD>.");
|
||||
chk = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(selDate != "") selDateChk = true;
|
||||
});
|
||||
if(chk == false){
|
||||
return false;
|
||||
}
|
||||
if(selDateChk == false){
|
||||
alert("<22><><EFBFBD>ڸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD>.");
|
||||
return false;
|
||||
}
|
||||
var url = "doc_commute_print.asp?";
|
||||
for(var i=1; i<=5; i++){
|
||||
url += "txt_date_" + i + "=" + $("input[name=txt_date_" + i + "]").val() + "&";
|
||||
url += "txt_in_time_1_" + i + "=" + $("input[name=txt_in_time_1_" + i + "]").val() + "&";
|
||||
url += "txt_out_time_1_" + i + "=" + $("input[name=txt_out_time_1_" + i + "]").val() + "&";
|
||||
url += "txt_reason_" + i + "=" + escape($("input[name=txt_reason_" + i + "]").val()) + "&";
|
||||
url += "txt_in_time_2_" + i + "=" + $("input[name=txt_in_time_2_" + i + "]").val() + "&";
|
||||
url += "txt_out_time_2_" + i + "=" + $("input[name=txt_out_time_2_" + i + "]").val() + "&";
|
||||
}
|
||||
url += "print_type=1";
|
||||
|
||||
window.open(url,"","left=50 ,top=0, menubar=no, location=no ,status=no ,toolbar=no ,width=740, height=860 ,scrollbars=yes ,resizable=yes");
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<!-- /.content-wrapper -->
|
||||
<!-- #include virtual = "include/footer.asp" -->
|
||||
Reference in New Issue
Block a user