145 lines
6.7 KiB
Plaintext
145 lines
6.7 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>프로젝트 계약금 수정 목록 (최근 3개월 이내 작성 내역)</h1>
|
|
</div>
|
|
<!-- /.content-header -->
|
|
<!-- Main content -->
|
|
<div class="content-body">
|
|
<div class="content">
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12" onclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}" ondblclick="javascript:try{if(winObj.window.focus()){}}catch(exception){}">
|
|
<form method='post' id='xform' name='xform'>
|
|
<table class="table table-sm table-bordered" style="font-size:13px;">
|
|
<thead>
|
|
<tr>
|
|
<td align="center" onclick="gwanshic(tbody01,0);" style="cursor:pointer">프로젝트코드</td>
|
|
<td align="center" width="410px" onclick="gwanshic(tbody01,1);" style="cursor:pointer">프로젝트명</td>
|
|
<td align="center" width="60px" onclick="gwanshic(tbody01,2);" style="cursor:pointer">승인일자</td>
|
|
<td align="center" width="90px" onclick="gwanshic(tbody01,3);" style="cursor:pointer">부서명</td>
|
|
<td align="center" width="50px" onclick="gwanshic(tbody01,4);" style="cursor:pointer">작성자</td>
|
|
<td align="center" width="90px" onclick="gwanshic(tbody01,5);" style="cursor:pointer">작성일자</td>
|
|
<td align="center" colspan='2'>기존 단위계약액 → 변경 단위계약액</td>
|
|
<td align="center" colspan='2'>기존 전체계약액 → 변경 전체계약액</td>
|
|
<td align="center" width="350px" onclick="gwanshic(tbody01,10);" style="cursor:pointer">사유</td>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tbody01">
|
|
<%
|
|
Function GetLastApprovalDate(target100)
|
|
Dim arr, i, result
|
|
result = ""
|
|
If target100 <> "" Then
|
|
arr = Split(target100, "^^")
|
|
For i = UBound(arr) To 0 Step -1
|
|
If Trim(arr(i)) <> "" And Trim(arr(i)) <> "/" Then
|
|
result = Trim(arr(i))
|
|
Exit For
|
|
End If
|
|
Next
|
|
End If
|
|
GetLastApprovalDate = result
|
|
End Function
|
|
sql=""&VbCrlf
|
|
sql=sql&" SELECT M.p_sn, p.p_subject, VD.T_name AS dept_name, p_method_cd, d_write_name AS p_name, d_write_date, "&VbCrlf
|
|
sql=sql&" target3 AS o_child_cost, target1 AS c_child_cost, "&VbCrlf
|
|
sql=sql&" target4 AS o_cost, target5 AS c_cost, "&VbCrlf
|
|
sql=sql&" target2 AS reason, target100 "&VbCrlf
|
|
sql=sql&" FROM 문서내용 M LEFT JOIN Document D ON M.문서번호 = D.d_no "&VbCrlf
|
|
sql=sql&" LEFT JOIN T_PROJECT_METHOD P ON M.p_sn = P.p_child_sn "&VbCrlf
|
|
sql=sql&" LEFT JOIN T_PROJECT_BASE TPB ON P.p_sn = TPB.p_sn "&VbCrlf
|
|
sql=sql&" LEFT JOIN V_Department VD ON ((ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101' AND P.p_rsch_dept = VD.before_t_cd1) OR (NOT (ISNULL(TPB.p_depart_dep, '') = '0' AND ISNULL(TPB.p_Depart_N, '') = 'E' AND ISNULL(TPB.p_Team_N, '') = '101') AND (((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) <> '' AND (ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = VD.Code) OR ((ISNULL(TPB.p_Depart_N, '') + ISNULL(TPB.p_Team_N, '')) = '' AND TPB.p_depart_dep = VD.before_t_cd1)))) "&VbCrlf
|
|
sql=sql&" WHERE 문서제목 = '프로젝트계약액수정' "&VbCrlf
|
|
sql=sql&" AND d_order_cnt = '77' AND del_yes_no = 'no' "&VbCrlf
|
|
sql=sql&" AND d_write_date >= CONVERT(varchar(10), DATEADD(MONTH, -3, getdate()), 120) "&VbCrlf
|
|
sql=sql&" ORDER BY d_write_date DESC "&VbCrlf
|
|
|
|
Rs.Open sql, adoConn, 1
|
|
While Not Rs.Eof
|
|
%>
|
|
<tr style="height:25px;">
|
|
<td style="text-align:center;" ><a href="javascript:openit('','<%=left(Rs("p_sn"),7)%>','<%=mid(Rs("p_sn"),9,1)%>','<%=Rs("p_method_cd")%>','<%=Rs("p_sn")%>');"><%=Rs("p_sn")%></a></td>
|
|
<td style="text-align:left;word-break:keep-all;" ><a href="javascript:openit('','<%=left(Rs("p_sn"),7)%>','<%=mid(Rs("p_sn"),9,1)%>','<%=Rs("p_method_cd")%>','<%=Rs("p_sn")%>');"><%=Rs("p_subject")%></a></td>
|
|
<td style="text-align:center;" ><%=GetLastApprovalDate(Rs("target100"))%></td>
|
|
<td style="text-align:center;" ><%=Rs("dept_name")%></td>
|
|
<td style="text-align:center;" ><%=Rs("p_name")%></td>
|
|
<td style="text-align:center;" ><%=Rs("d_write_date")%></td>
|
|
<td style="text-align:center;" ><%if Rs("o_child_cost") <> Rs("c_child_cost") then %><%=formatnumber(Rs("o_child_cost"), 0)%><% end if %></td>
|
|
<td style="text-align:center;" ><%if Rs("o_child_cost") <> Rs("c_child_cost") then %><%=formatnumber(Rs("c_child_cost"), 0)%><% end if %></td>
|
|
<td style="text-align:center;" ><%if Rs("o_cost") <> Rs("c_cost") then %><%=formatnumber(Rs("o_cost"), 0)%><% end if %></td>
|
|
<td style="text-align:center;" ><%if Rs("o_cost") <> Rs("c_cost") then %><%=formatnumber(Rs("c_cost"), 0)%><% end if %></td>
|
|
<td style="text-align:left;word-break:keep-all;" ><%=Rs("reason")%></td>
|
|
</tr>
|
|
<%
|
|
Rs.movenext
|
|
Wend
|
|
Rs.Close
|
|
%>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- /.content -->
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<script>
|
|
function openit(a, z, x, y, v) {
|
|
var url = 'project_list2_dep_2014.asp?p_sn=' + z;
|
|
var tmp_width = 1400;
|
|
var tmp_height = 800;
|
|
|
|
if (v != "") {
|
|
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y + "&p_child_sn=" + v;
|
|
} else {
|
|
url = url + "&p_sub_type=" + x + "&p_method_cd=" + y;
|
|
}
|
|
winObj=window.open(url, '', 'left=0,top=0,width=' + tmp_width + ',height=' + tmp_height + ',scrollbars=yes,resizable=yes')
|
|
}
|
|
|
|
var index;
|
|
var toggleBool;
|
|
function gwanshic(tbody, index){
|
|
this.index = index;
|
|
if(toggleBool){toggleBool = false;}
|
|
else{toggleBool = true;}
|
|
|
|
var datas= new Array();
|
|
var tbodyLength = tbody.rows.length;
|
|
for(var i=0; i<tbodyLength; i++){datas[i] = tbody.rows[i];}
|
|
datas.sort(compareCells);
|
|
for(var i=0; i<tbody.rows.length; i++){tbody.appendChild(datas[i]);}
|
|
}
|
|
|
|
function compareCells(a,b) {
|
|
var aVal = a.cells[index].innerText;
|
|
var bVal = b.cells[index].innerText;
|
|
aVal = aVal.replace(/\,/g, '');
|
|
bVal = bVal.replace(/\,/g, '');
|
|
|
|
if(toggleBool){
|
|
var temp = aVal;
|
|
aVal = bVal;
|
|
bVal = temp;
|
|
}
|
|
|
|
if(aVal.match(/^[0-9]+$/) && bVal.match(/^[0-9]+$/)){
|
|
return parseFloat(aVal) - parseFloat(bVal);
|
|
}else{
|
|
if (aVal < bVal){ return -1;}
|
|
else if (aVal > bVal){ return 1;}
|
|
else{return 0;}
|
|
}
|
|
}
|
|
</script>
|
|
</div>
|
|
<!-- /.content-wrapper -->
|
|
<!-- #include virtual = "include/footer.asp" -->
|
|
|