diff --git a/approval/allow_listall.asp b/approval/allow_listall.asp index 71e90e2..a2f0f52 100644 --- a/approval/allow_listall.asp +++ b/approval/allow_listall.asp @@ -2,6 +2,45 @@ <% x = "2" + +Dim title() +Max_Title = 26 +Dim sel_type +ReDim title(Max_Title, 3) +Dim sel_year +Dim doc_year_list() +sel_year = CStr(Year(Now)) +If Request("sel_year") <> "" Then + sel_year = Request("sel_year") +End If +query = "select distinct 문서제목 from 문서내용 order by 문서제목" +Rs.Open query, adoConn, 1 +ReDim title(Rs.RecordCount, 3) +title(0, 1) = "전체" +i = 0 +Do While Not Rs.EOF + i = i + 1 + title(i, 1) = Rs("문서제목") + Rs.MoveNext +Loop +Rs.Close + +query = "select distinct left(발급일,4) as 발급일 from 문서내용 order by left(발급일,4) desc" +Rs.Open query, adoConn, 1 +ReDim doc_year_list(Rs.RecordCount) +i = 0 +Do While Not Rs.EOF + i = i + 1 + doc_year_list(i) = Rs("발급일") + Rs.MoveNext +Loop +Rs.Close + +sel_type = Request("sel_type") +If Trim(sel_type) = "" Then + sel_type = "0" +End If +p_hotvalue = Request("p_hotvalue") if request("gotopage") <> "" then tmp_currentpage = request("gotopage") else @@ -34,13 +73,65 @@ End Function
+
<% - query = "SELECT * " - query = query & "FROM Document a " - query = query & " INNER JOIN 문서내용 b on a.d_no = b.문서번호 " + query = "SELECT a.*, b.* " + query = query & "FROM Document a WITH(NOLOCK) " + query = query & " INNER JOIN 문서내용 b WITH(NOLOCK) on a.d_no = b.문서번호 " + query = query & " LEFT OUTER JOIN direct_costcode D1 WITH(NOLOCK) ON CONVERT(VARCHAR(5), b.target11) = CONVERT(VARCHAR(5), D1.id) " + query = query & " LEFT OUTER JOIN direct_costcode D2 WITH(NOLOCK) ON CONVERT(VARCHAR(5), b.target12) = CONVERT(VARCHAR(5), D2.id) " query = query & "WHERE b.login_p_no <> '" & Session("User_Number") & "' " query = query & " AND a.d_delok = 'N' " - query = query & " AND a.d_name <> '업무일지' " + If sel_type <> "0" Then + query = query & " AND a.d_name = '" & title(sel_type, 1) & "' " + Else + query = query & " AND a.d_name <> '업무일지' " + End If + If sel_year <> "all" Then + query = query & " AND a.d_no LIKE 'KRC-" & sel_year & "%' " + End If + If p_hotvalue <> "" Then + query = query & " AND ( " + query = query & " b.p_sn LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " a.d_write_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " D1.d_cost_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " D2.d_cost_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " a.d_no LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target8 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target9 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target20 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target21 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target22 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target23 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target24 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target25 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target26 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target27 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target28 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target29 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target30 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target31 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target32 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target33 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target34 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target35 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target36 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target37 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target38 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target39 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target40 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target41 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target42 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target43 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target44 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target45 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target46 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target47 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target48 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target49 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target50 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' " + query = query & " ) " + End If query = query & " AND a.d_order_cnt in ('77') " query = query & " AND (a.d_order1 = '" & Session("User_Number") & "' " for tmp_i = 2 to 4 @@ -54,7 +145,31 @@ End Function %> - +
목록결과 : 총 <%=tmp_count%>개의 항목이 있습니다. + 발급일 : + 목록결과 : 총 <%=formatnumber(tmp_count,0)%>개의 항목이 있습니다. +         + <%if tmp_project_chk = "1" OR tmp_admin_chk = "1" then%> + 문서종류 + + <%end if%> +     + +    작성자, 프로젝트 코드, 거래처, 항목, 세부, 문서번호, 품의문서로 검색 가능 +
@@ -137,10 +252,11 @@ End Function Rs.Close %>
- <%=Pagelist("allow_listall.asp",tmp_currentpage ,tmp_bcolor , "", pagecount, "&b_type=" & b_type)%> + <%=Pagelist("allow_listall.asp",tmp_currentpage ,tmp_bcolor , "", pagecount, "&b_type=" & b_type & "&sel_type=" & sel_type & "&p_hotvalue=" & p_hotvalue & "&sel_year=" & sel_year)%> +
@@ -149,6 +265,11 @@ End Function " + Response.End + End If end select '@@@@@ 삭제처리 ↑ @@@@@@@@@@@ @@ -303,6 +347,45 @@ if x = "99" then x = "3" end if +dim title() +Max_Title = 26 +dim sel_type +redim title(Max_Title, 3) +dim sel_year +dim doc_year_list() +sel_year = cstr(year(now)) +if request("sel_year") <> "" then + sel_year = request("sel_year") +end if +query = "select distinct 문서제목 from 문서내용 order by 문서제목" +Rs.Open query, adoConn, 1 +redim title(Rs.recordcount, 3) +title(0, 1) = "전체" +i=0 +do while not Rs.eof + i = i + 1 + title(i , 1) = Rs("문서제목") + Rs.movenext +loop +Rs.close + +query = "select distinct left(발급일,4) as 발급일 from 문서내용 order by left(발급일,4) desc" +Rs.Open query, adoConn, 1 +redim doc_year_list(Rs.recordCount) +i=0 +do while not Rs.eof + i = i + 1 + doc_year_list(i) = Rs("발급일") + Rs.movenext +loop +Rs.close + +sel_type = request("sel_type") +if trim(sel_type) = "" then + sel_type = "0" +end if +p_hotvalue = request("p_hotvalue") + if request("gotopage") <> "" then tmp_currentpage = request("gotopage") else @@ -349,9 +432,11 @@ end if
<% - query = " SELECT * " + query = " SELECT a.*, b.* " query = query & " FROM Document a WITH(NOLOCK) " query = query & " INNER JOIN 문서내용 b WITH(NOLOCK) on a.d_no = b.문서번호 " + query = query & " LEFT OUTER JOIN direct_costcode D1 WITH(NOLOCK) ON CONVERT(VARCHAR(5), b.target11) = CONVERT(VARCHAR(5), D1.id) " + query = query & " LEFT OUTER JOIN direct_costcode D2 WITH(NOLOCK) ON CONVERT(VARCHAR(5), b.target12) = CONVERT(VARCHAR(5), D2.id) " if x <> "4" then '반려한 문서는 작성자를 안따라감. query = query & "WHERE b.login_p_no = '" & Session("User_Number") & "' " else @@ -372,7 +457,56 @@ end if query = query & " AND b.del_yes_no = 'yes' " end if query = query & " AND a.d_view = 'Y' " - query = query & " AND b.문서제목 <> '업무일지' AND b.문서제목 <> '부서비신청서' AND b.문서제목 <> '접대비보고서' " + If sel_type <> "0" Then + query = query & " AND a.d_name = '" & title(sel_type, 1) & "' " + Else + query = query & " AND b.문서제목 <> '업무일지' AND b.문서제목 <> '부서비신청서' AND b.문서제목 <> '접대비보고서' " + End If + If sel_year <> "all" Then + query = query & " AND a.d_no LIKE 'KRC-" & sel_year & "%' " + End If + If p_hotvalue <> "" Then + query = query & " AND ( " + query = query & " b.p_sn LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " a.d_write_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " D1.d_cost_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " D2.d_cost_name LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " a.d_no LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target8 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target9 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target20 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target21 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target22 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target23 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target24 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target25 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target26 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target27 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target28 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target29 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target30 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target31 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target32 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target33 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target34 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target35 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target36 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target37 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target38 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target39 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target40 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target41 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target42 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target43 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target44 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target45 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target46 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target47 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target48 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target49 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' OR " + query = query & " b.target50 LIKE '%" & replace(p_hotvalue, "_", "[_]") & "%' " + query = query & " ) " + End If query = query & "ORDER BY a.d_sn DESC " Rs.Open query, adoConn, 1 @@ -381,7 +515,31 @@ end if <%=xadmin_print%> - + <%If x="1" Then %> @@ -397,6 +555,7 @@ end if + @@ -466,13 +625,7 @@ end if tmp_flag = "t2" end If - if (tmp_admin_chk = "1" OR Session("loginuser") = "양영은") AND Rs("문서제목") = "지출결의서" then - tmp_value = " - " & FormatNumber(Replace(Rs("target5"), ",", ""), 0) - elseif (tmp_admin_chk = "1" OR Session("loginuser") = "양영은") AND Rs("문서제목") = "품의서" then - tmp_value = " - " & FormatNumber(Replace(Rs("target5"), ",", ""), 0) & " [" & LEFT(Rs("target9"),20) & "]" - else - tmp_value = "" - end if + tmp_value = "" if not (isnull(Rs("p_sn")) or trim(Rs("p_sn")) = "") or right(Rs("문서제목"), 7) = "수당지출결의서" then tmp_value = tmp_value & " ◆(" if right(Rs("문서제목"), 7) = "수당지출결의서" then @@ -574,6 +727,7 @@ end if <% end if%> + <% if x <> 99 and x = 1 and (Rs("문서제목") <> "지출결의서" or (Rs("문서제목") = "지출결의서" and Rs("target20") = "") ) then%>
목록결과 : 총 <%=tmp_count%>개의 항목이 있습니다. + 발급일 : + 목록결과 : 총 <%=formatnumber(tmp_count,0)%>개의 항목이 있습니다. +         + <%if tmp_project_chk = "1" OR tmp_admin_chk = "1" then%> + 문서종류 + + <%end if%> +     + +    작성자, 프로젝트 코드, 거래처, 항목, 세부, 문서번호, 품의문서로 검색 가능 +
거래처 증빙일 작성일작성자 처리 요청 인쇄여부 <%=Rs("d_write_date")%><%=Rs("login_이름")%> <%=tmp_txt%> @@ -705,6 +859,11 @@ end if document.ess.submit(); } } + + function subit(a){ + document.ess.action = "mainpage_2014.asp?x=<%=x%>"; + document.ess.submit(); + } diff --git a/business/busi_approval.asp b/business/busi_approval.asp index 307649c..1140c10 100644 --- a/business/busi_approval.asp +++ b/business/busi_approval.asp @@ -82,6 +82,21 @@ %> + <% + '최환인 경우 업무일지 비용 정산 올리면 바로 대표님(조우철)에게 승인요청 가도록 수정 + If CStr(Session("User_Number")) = "20150302" And CInt(d_order_cnt) = 4 And CStr(d_order3) = "20150302" And CStr(d_order4) = "20150302" And CStr(d_order5) = "전결" Then + + 'Move the writer signature to approval slot 4 + tmp_txt4 = tmp_txt3 + tmp_txt3 = "전결" + tmp_txt9 = tmp_txt8 + tmp_txt8 = "/" + + d_order3 = "전결" + d_order5 = tmp_ess(0, 0) + d_order_cnt = 5 + End If + %> <% target99 = tmp_txt1 & "^^" & tmp_txt2 & "^^" & tmp_txt3 & "^^" & tmp_txt4 & "^^" & tmp_txt5 diff --git a/ess/0config_ess.asp b/ess/0config_ess.asp index ac0c94e..03b0386 100644 --- a/ess/0config_ess.asp +++ b/ess/0config_ess.asp @@ -168,7 +168,7 @@ If Session("N_depart") = "R" AND Session("N_team") = "605" Then '605: End If '개발인지 체크 -if replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.") = session("admin_ip") then +if replace(replace(Request.ServerVariables("REMOTE_ADDR"), "10.10.20.", "10.10.13."), "10.10.17.", "10.10.13.") = session("admin_ip") or cstr(Session("User_Number")) = cstr(tmp_ess(3, 5)) then tmp_admin_chk = "1" else tmp_admin_chk = "0" diff --git a/inspection/capi_device_current_status.asp b/inspection/capi_device_current_status.asp new file mode 100644 index 0000000..b636e96 --- /dev/null +++ b/inspection/capi_device_current_status.asp @@ -0,0 +1,162 @@ + + +<% + Dim query1, query2 +%> + +
+ +
+

CAPI 기기 현황

+
+ +
+
+
+
+
+
기준일 현황
+ <% + query1 = "" + query1 = query1 & " SELECT " + query1 = query1 & " CONVERT(varchar(10), GETDATE(), 120) AS BASE_DT, " + query1 = query1 & " COUNT(*) AS TOTAL_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'Y' THEN 1 ELSE 0 END) AS USE_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'N' THEN 1 ELSE 0 END) AS AVAIL_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'X' AND DISUSE_RSN_CD = '01' THEN 1 ELSE 0 END) AS LOST_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'X' AND DISUSE_RSN_CD = '02' THEN 1 ELSE 0 END) AS BROKEN_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'X' AND DISUSE_RSN_CD = '03' THEN 1 ELSE 0 END) AS FAIL_CNT, " + query1 = query1 & " SUM(CASE WHEN USE_YN = 'X' AND DISUSE_RSN_CD = '04' THEN 1 ELSE 0 END) AS STOP_CNT " + query1 = query1 & " FROM project2.dbo.T_DEVICE_NEW " + + adors.open query1, adoconn, adopenstatic, adlockreadonly + %> + + + + + + + + + + + + + + + + + + + + + + + + +
기준일총수량사용중미사용대여불가
분실파손고장정지
<%=adors("BASE_DT")%><%=adors("TOTAL_CNT")%><%=adors("USE_CNT")%><%=adors("AVAIL_CNT")%><%=adors("LOST_CNT")%><%=adors("BROKEN_CNT")%><%=adors("FAIL_CNT")%><%=adors("STOP_CNT")%>
+ <% adors.close %> + +
+
프로젝트별 분출 현황
+ <% + query2 = "" + query2 = query2 & " SELECT " + query2 = query2 & " D.P_CHILD_SN, " + query2 = query2 & " ISNULL(VPM.P_SUBJECT, '') AS P_SUBJECT, " + query2 = query2 & " COUNT(*) AS OUT_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '53' THEN 1 ELSE 0 END) AS STAFF_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun IN ('10','21','31','41','42','43','44','45','46','51','52') THEN 1 ELSE 0 END) AS SEOUL_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '12' THEN 1 ELSE 0 END) AS BUSAN_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '13' THEN 1 ELSE 0 END) AS DAEGU_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '14' THEN 1 ELSE 0 END) AS DAEJEON_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '15' THEN 1 ELSE 0 END) AS GWANGJU_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '16' THEN 1 ELSE 0 END) AS GANGWON_CNT, " + query2 = query2 & " SUM(CASE WHEN M.m_gubun = '17' THEN 1 ELSE 0 END) AS JEJU_CNT " + query2 = query2 & " FROM project2.dbo.T_DEVICE_NEW D " + query2 = query2 & " LEFT JOIN project2.dbo.man M ON D.MAN_ID = M.new_id " + query2 = query2 & " LEFT JOIN project2.dbo.T_PROJECT_METHOD VPM ON D.P_CHILD_SN = VPM.p_child_sn " + query2 = query2 & " WHERE D.P_CHILD_SN <> '' " + query2 = query2 & " GROUP BY D.P_CHILD_SN, VPM.P_SUBJECT " + query2 = query2 & " ORDER BY D.P_CHILD_SN " + + adors.open query2, adoconn, adopenstatic, adlockreadonly + + Dim rowNo : rowNo = 0 + Dim totalOut, totalStaff, totalSeoul, totalBusan, totalDaegu, totalDaejeon, totalGwangju, totalGangwon, totalJeju + totalOut = 0 : totalStaff = 0 : totalSeoul = 0 : totalBusan = 0 : totalDaegu = 0 : totalDaejeon = 0 : totalGwangju = 0 : totalGangwon = 0 : totalJeju = 0 + %> + + + + + + + + + + + + + + + + + + + + + + <% Do While Not adors.Eof + rowNo = rowNo + 1 + %> + + + + + + + + + + + + + + + <% + totalOut = totalOut + adors("OUT_CNT") + totalStaff = totalStaff + adors("STAFF_CNT") + totalSeoul = totalSeoul + adors("SEOUL_CNT") + totalBusan = totalBusan + adors("BUSAN_CNT") + totalDaegu = totalDaegu + adors("DAEGU_CNT") + totalDaejeon = totalDaejeon + adors("DAEJEON_CNT") + totalGwangju = totalGwangju + adors("GWANGJU_CNT") + totalGangwon = totalGangwon + adors("GANGWON_CNT") + totalJeju = totalJeju + adors("JEJU_CNT") + adors.MoveNext + Loop + adors.close + %> + + + + + + + + + + + + +
No프로젝트 코드프로젝트명분출수량분출처
직원서울지방실사
부산대구대전광주강원제주
<%=rowNo%><%=adors("P_CHILD_SN")%><%=adors("P_SUBJECT")%><%=adors("OUT_CNT")%><%=adors("STAFF_CNT")%><%=adors("SEOUL_CNT")%><%=adors("BUSAN_CNT")%><%=adors("DAEGU_CNT")%><%=adors("DAEJEON_CNT")%><%=adors("GWANGJU_CNT")%><%=adors("GANGWON_CNT")%><%=adors("JEJU_CNT")%>
총계<%=totalOut%><%=totalStaff%><%=totalSeoul%><%=totalBusan%><%=totalDaegu%><%=totalDaejeon%><%=totalGwangju%><%=totalGangwon%><%=totalJeju%>
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/inspection/capi_device_log.asp b/inspection/capi_device_log.asp index c122248..0ae7339 100644 --- a/inspection/capi_device_log.asp +++ b/inspection/capi_device_log.asp @@ -8,24 +8,22 @@ Response.Expires = -1 query = "" - query = query & " SELECT ROW_NUMBER() OVER(ORDER BY D.ID) AS NO, D.ID, DU.ID as UID, D.T_DEVICE_MODEL, D.T_NO, " - query = query & " ISNULL(DU.P_CHILD_SN, '') AS P_CHILD_SN, " - query = query & " ISNULL(VPM.P_SUBJECT, '') AS P_SUBJECT, " - query = query & " ISNULL(DU.MAN_ID, '') AS MAN_ID," - query = query & " ISNULL(M.M_NAME, '') AS M_NAME," - query = query & " ISNULL(DU.USE_ST_DT, '') AS USE_ST_DT," - query = query & " ISNULL(DU.USE_ED_DT, '') AS USE_ED_DT," - query = query & " ISNULL(DU.D_NO, '') AS D_NO," - query = query & " ISNULL(DU.INSERT_USER, '') AS INSERT_USER," - query = query & " ISNULL(P.p_name, '') AS INSERT_USER_NAME," - query = query & " INSERT_DT, MODIFY_DT " - query = query & " FROM project2.dbo.T_DEVICE D" - query = query & " LEFT JOIN project2.dbo.T_DEVICE_USE DU ON D.ID = DU.DEVICE_ID" - query = query & " LEFT JOIN project2.dbo.V_PROJECT_METHOD VPM ON DU.P_CHILD_SN = VPM.p_child_sn" - query = query & " LEFT JOIN project2.dbo.man M ON DU.MAN_ID = M.new_id" - query = query & " LEFT JOIN project2.dbo.V_Person P ON DU.INSERT_USER = P.p_no " - query = query & " WHERE D.ID = " & device_id & " AND DU.USE_YN = 'N' " - query = query & " ORDER BY MODIFY_DT DESC " + query = query & " select ISNULL(DU.P_CHILD_SN, '') AS P_CHILD_SN, " + query = query & " ISNULL(VPM.P_SUBJECT, '') AS P_SUBJECT, " + query = query & " ISNULL(DU.MAN_ID, '') AS MAN_ID, " + query = query & " ISNULL(M.M_NAME, '') AS M_NAME, " + query = query & " ISNULL(DU.USE_ST_DT, '') AS USE_ST_DT, " + query = query & " ISNULL(DU.USE_ED_DT, '') AS USE_ED_DT, " + query = query & " ISNULL(DU.D_NO, '') AS D_NO, " + query = query & " ISNULL(P.p_name, '') AS INSERT_USER_NAME, " + query = query & " DU.INSERT_DT, DU.MODIFY_DT " + query = query & " from T_DEVICE_USE_NEW DU " + query = query & " JOIN T_DEVICE_NEW D ON D.ID = DU.DEVICE_ID " + query = query & " LEFT JOIN project2.dbo.T_PROJECT_METHOD VPM ON DU.P_CHILD_SN = VPM.p_child_sn " + query = query & " LEFT JOIN project2.dbo.man M ON DU.MAN_ID = M.new_id " + query = query & " LEFT JOIN project2.dbo.person P ON DU.INSERT_USER = P.p_no " + query = query & " WHERE D.ID = " & device_id & " AND DU.USE_YN <> 'Y' " + query = query & " ORDER BY DU.MODIFY_DT DESC " response.write "" response.write "" diff --git a/inspection/capi_device_man_reg.asp b/inspection/capi_device_man_reg.asp index fd2702a..7df1465 100644 --- a/inspection/capi_device_man_reg.asp +++ b/inspection/capi_device_man_reg.asp @@ -12,9 +12,9 @@ Response.Expires = -1 query = "" - query = query & " UPDATE project2.dbo.T_DEVICE_USE " + query = query & " UPDATE project2.dbo.T_DEVICE_NEW " query = query & " SET MAN_ID = '" & man_id & "' " - query = query & " WHERE DEVICE_ID = " & device_id & " AND USE_YN = 'Y' " + query = query & " WHERE ID = " & device_id dbin.Open adoConn dbin.Execute query, i diff --git a/inspection/capi_device_mod.asp b/inspection/capi_device_mod.asp index 56a5d6f..e0ab0b9 100644 --- a/inspection/capi_device_mod.asp +++ b/inspection/capi_device_mod.asp @@ -19,43 +19,20 @@ Response.Expires = -1 query = "" - query = query & " SELECT ID " - query = query & " FROM project2.dbo.T_DEVICE_USE " - query = query & " WHERE DEVICE_ID = " & device_id & " AND USE_YN = 'Y' " + query = query & " UPDATE T_DEVICE_NEW " + query = query & " SET P_CHILD_SN = '" & p_child_sn & "', " + query = query & " USE_YN = 'Y', " + query = query & " MAN_ID = " & man_value & ", " + query = query & " USE_ED_DT = '" & use_ed_dt & "'" + query = query & " WHERE ID IN (" & device_id & ")" - Rs.Open Query, adoConn, 1 - if Rs.recordCount > 0 then - row_id = Rs("ID") + dbin.Open adoConn + dbin.Execute query, i + dbin.Close + + if i > 0 Then + response.Write "1" else - row_id = "0" - end if - Rs.close - - if cint(row_id) > 0 then - query = "" - query = query & " UPDATE project2.dbo.T_DEVICE_USE " - query = query & " SET USE_YN = 'N', MODIFY_DT = getdate() " - query = query & " WHERE ID = " & row_id & " " - - dbin.Open adoConn - dbin.Execute query, i - dbin.Close - - if i > 0 Then - query = "" - query = query & " INSERT INTO project2.dbo.T_DEVICE_USE " - query = query & " (DEVICE_ID, P_CHILD_SN, USE_ST_DT, USE_ED_DT, MAN_ID, USE_YN, D_NO, MODIFY_DT, INSERT_DT, INSERT_USER) " - query = query & " SELECT " & device_id & ", '" & p_child_sn & "', USE_ST_DT, '" & use_ed_dt & "', " & man_value & ", 'Y', D_NO, getdate(), getdate(), INSERT_USER " - query = query & " FROM project2.dbo.T_DEVICE_USE " - query = query & " WHERE ID = " & row_id & " " - - dbin.Open adoConn - dbin.Execute query - dbin.Close - - response.Write "1" - else - response.Write "0" - end if + response.Write "0" end if %> \ No newline at end of file diff --git a/inspection/capi_device_reg.asp b/inspection/capi_device_reg.asp index 8accb22..69eb921 100644 --- a/inspection/capi_device_reg.asp +++ b/inspection/capi_device_reg.asp @@ -3,7 +3,7 @@ set dbin = server.CreateObject("ADODB.CONNECTION") - p_child_sn = URLDecode(request("p_child_sn")) + p_child_sn = request("p_child_sn") use_st_dt = request("use_st_dt") use_ed_dt = request("use_ed_dt") use_device_cnt = request("use_device_cnt") @@ -19,46 +19,35 @@ response.End END IF + 'query = "" + 'query = query & " SELECT ID " + 'query = query & " FROM project2.dbo.V_DEVICE_STATUS " + 'query = query & " WHERE P_CHILD_SN = '' " + 'query = query & " AND ID IN (" & use_device_id & ")" + + 'Rs.Open Query, adoConn, 1 + + 'if Rs.recordcount < cint(use_device_cnt) Then + ' Rs.Close + ' response.Write "2" + ' response.End + 'End if + 'Rs.close + query = "" - query = query & " SELECT ID " - query = query & " FROM project2.dbo.V_DEVICE_STATUS " - query = query & " WHERE P_CHILD_SN = '' " - query = query & " AND ID IN (" & use_device_id & ")" + query = query & " UPDATE T_DEVICE_NEW " + query = query & " SET P_CHILD_SN = '" & p_child_sn & "', " + query = query & " USE_YN = 'Y', " + query = query & " USE_ST_DT = '" & use_st_dt & "', " + query = query & " USE_ED_DT = '" & use_ed_dt & "', " + query = query & " INSERT_USER = '" & session("User_number") & "' " + query = query & " WHERE ID IN (" & use_device_id & ")" - Rs.Open Query, adoConn, 1 + dbin.Open adoConn + dbin.Execute query, i + dbin.Close - if Rs.recordcount < cint(use_device_cnt) Then - Rs.Close - response.Write "2" - response.End - End if - insertCnt = 0 - - now_year = Right(left(now(),4),2) - now_month = mid(now(),6,2) - now_day = mid(now(),9,2) - now_hour = right("0" & hour(now), 2) - now_minute = right("0" & minute(now), 2) - now_second = right("0" & second(now), 2) - now_micro = right("000" & (timer * 1000) Mod 1000, 3) - - d_no = "G" & now_year & now_month & now_day & now_hour & now_minute & now_second & now_micro ' 그룹ID - - for k=1 To Rs.recordcount - query = "" - query = query & " INSERT INTO project2.dbo.T_DEVICE_USE " - query = query & " (DEVICE_ID, P_CHILD_SN, USE_ST_DT, USE_ED_DT, D_NO, USE_YN, MODIFY_DT, INSERT_DT, INSERT_USER) VALUES " - query = query & " (" & Rs("ID") & ", '" & p_child_sn & "', '" & use_st_dt & "', '" & use_ed_dt & "', '" & d_no & "', 'Y', getdate(), getdate(), '" & session("User_number") & "'); " - - dbin.Open adoConn - dbin.Execute query - dbin.Close - insertCnt = insertCnt + 1 - - Rs.moveNext - Next - Rs.close - if insertCnt = cint(use_device_cnt) Then + if i > 0 Then response.Write "1" else response.Write "0" diff --git a/inspection/capi_device_return.asp b/inspection/capi_device_return.asp index f9eea69..cad32c8 100644 --- a/inspection/capi_device_return.asp +++ b/inspection/capi_device_return.asp @@ -1,19 +1,54 @@ <% - + set dbin = server.CreateObject("ADODB.CONNECTION") - + device_id = request("device_id") + use_yn = request("use_yn") + disuse_rsn_cd = request("disuse_rsn_cd") Response.CharSet = "EUC-KR" '한글 Response.AddHeader "Pragma","no-cache" Response.AddHeader "cache-control", "no-staff" Response.Expires = -1 + if disuse_rsn_cd = "" then + disuse_value = "NULL" + else + disuse_value = "'" & disuse_rsn_cd & "'" + end if + + now_year = Right(left(now(),4),2) + now_month = mid(now(),6,2) + now_day = mid(now(),9,2) + now_hour = right("0" & hour(now), 2) + now_minute = right("0" & minute(now), 2) + now_second = right("0" & second(now), 2) + now_micro = right("000" & (timer * 1000) Mod 1000, 3) + + d_no = "G" & now_year & now_month & now_day & now_hour & now_minute & now_second & now_micro ' 그룹ID + query = "" - query = query & " UPDATE project2.dbo.T_DEVICE_USE " - query = query & " SET USE_YN = 'N', MODIFY_DT = getdate() " - query = query & " WHERE DEVICE_ID IN (" & device_id & ") AND USE_YN = 'Y' " + query = query & " INSERT INTO project2.dbo.T_DEVICE_USE_NEW " + query = query & " (DEVICE_ID, P_CHILD_SN, MAN_ID, USE_ST_DT, USE_ED_DT, USE_YN, D_NO, MODIFY_DT, INSERT_DT, INSERT_USER) " + query = query & " SELECT ID, P_CHILD_SN, MAN_ID, ISNULL(USE_ST_DT, ''), ISNULL(USE_ED_DT, ''), '" & use_yn & "', '" & d_no & "', getdate(), getdate(), '" & session("User_number") & "' " + query = query & " FROM project2.dbo.T_DEVICE_NEW " + query = query & " WHERE ID IN (" & device_id & ") AND ISNULL(P_CHILD_SN, '') <> '' " + + dbin.Open adoConn + dbin.Execute query + dbin.Close + + query = "" + query = query & " UPDATE project2.dbo.T_DEVICE_NEW " + query = query & " SET USE_YN = '" & use_yn & "', " + query = query & " DISUSE_RSN_CD = " & disuse_value & ", " + query = query & " P_CHILD_SN = '', " + query = query & " MAN_ID = NULL, " + query = query & " USE_ST_DT = NULL, " + query = query & " USE_ED_DT = NULL, " + query = query & " INSERT_USER = NULL " + query = query & " WHERE ID IN (" & device_id & ")" dbin.Open adoConn dbin.Execute query, i diff --git a/inspection/capi_device_status.asp b/inspection/capi_device_status.asp index ef29aaf..f8f0efc 100644 --- a/inspection/capi_device_status.asp +++ b/inspection/capi_device_status.asp @@ -3,6 +3,8 @@ <% Dim query, p_no p_no = session("User_Number") + Dim isAdminUser + isAdminUser = (cstr(session("User_Number")) = "20210405" Or cstr(session("User_Number")) = "20191104" Or cstr(session("User_Number")) = "20250301" Or cstr(session("User_Number")) = "20251001") %>
@@ -83,6 +85,9 @@ width: 120px; display: inline-block; } + #device_status > tbody > tr.device-disuse > td{ + background-color:#fbdede; + } #deviceRegDialog table tr td { padding:4px; @@ -168,6 +173,7 @@ 프로젝트 : 대여신청자 : 면접원 : + 상태 :
조회된 기기 수 :
@@ -179,12 +185,40 @@ dim availity_device_cnt, chk_user availity_device_cnt = 0 query = "" - query = query & " SELECT NO, ID, T_DEVICE_MODEL, T_NO, T_PHONE_NO, P_CHILD_SN, P_SUBJECT, " - query = query & " MAN_ID, M_NAME, USE_ST_DT, USE_ED_DT, D_NO, INSERT_USER, INSERT_USER_NAME, " - query = query & " (SELECT COUNT(*) FROM project2.dbo.T_DEVICE_USE WHERE USE_YN = 'N' AND DEVICE_ID = VDS.ID) AS LOG_CNT " - query = query & " FROM project2.dbo.V_DEVICE_STATUS VDS " - query = query & " WHERE P_CHILD_SN NOT LIKE '%대여불가%' " - query = query & " ORDER BY NO " + query = query & " select CASE WHEN CHARINDEX('-', REVERSE(D.NO)) > 0 THEN CAST(RIGHT(D.NO, CHARINDEX('-', REVERSE(D.NO)) - 1) AS INT) ELSE 0 END AS NO, " + query = query & " D.ID, " + query = query & " D.DEVICE_MODEL, " + query = query & " D.NO AS T_NO, " + query = query & " D.PHONE_NO," + query = query & " ISNULL(D.P_CHILD_SN, '') AS P_CHILD_SN, " + query = query & " ISNULL(VPM.P_SUBJECT, '') AS P_SUBJECT, " + query = query & " ISNULL(D.MAN_ID, '') AS MAN_ID, " + query = query & " ISNULL(M.M_NAME, '') AS M_NAME, " + query = query & " ISNULL(D.USE_ST_DT, '') AS USE_ST_DT, " + query = query & " ISNULL(D.USE_ED_DT, '') AS USE_ED_DT, " + query = query & " ISNULL(D.INSERT_USER, '') AS INSERT_USER, " + query = query & " ISNULL(P.p_name, '') AS INSERT_USER_NAME, " + query = query & " D.USE_YN AS USE_YN_CD, " + query = query & " ISNULL(D.DISUSE_RSN_CD, '') AS DISUSE_RSN_CD, " + query = query & " CASE D.USE_YN " + query = query & " WHEN 'Y' THEN N'사용중' " + query = query & " WHEN 'N' THEN N'미사용' " + query = query & " WHEN 'X' THEN N'대여불가(' + " + query = query & " CASE D.DISUSE_RSN_CD " + query = query & " WHEN '01' THEN N'분실' " + query = query & " WHEN '02' THEN N'파손' " + query = query & " WHEN '03' THEN N'고장' " + query = query & " WHEN '04' THEN N'정지' " + query = query & " ELSE N'' " + query = query & " END + N')' " + query = query & " ELSE D.USE_YN " + query = query & " END AS USE_YN, " + query = query & " (SELECT COUNT(*) FROM project2.dbo.T_DEVICE_USE DU WHERE DU.USE_YN = 'N' AND DU.DEVICE_ID = D.ID) AS LOG_CNT " + query = query & " FROM project2.dbo.T_DEVICE_NEW D " + query = query & " LEFT JOIN project2.dbo.T_PROJECT_METHOD VPM ON D.P_CHILD_SN = VPM.p_child_sn " + query = query & " LEFT JOIN project2.dbo.man M ON D.MAN_ID = M.new_id " + query = query & " LEFT JOIN project2.dbo.person P ON D.INSERT_USER = P.p_no " + query = query & " ORDER BY D.NO " adors.open query, adoconn, adopenstatic, adlockreadonly %> @@ -195,6 +229,7 @@
+ @@ -208,16 +243,17 @@ Do While Not adors.Eof chk_user = iif(adors("INSERT_USER") = cstr(session("User_Number")), true, false) ' insert_user와 로그인 유저가 같으면 true - if adors("P_CHILD_SN") = "" then '대여 가능한 기기일때 + if adors("P_CHILD_SN") = "" AND adors("USE_YN_CD") = "N" then '대여 가능한 기기일때 availity_device_cnt = availity_device_cnt + 1 end if %> - + > - + - + + @@ -279,7 +326,7 @@ <% adors.moveFirst Do While Not adors.Eof - if adors("P_CHILD_SN") = "" then + if adors("P_CHILD_SN") = "" AND adors("USE_YN_CD") = "N" then %> <% @@ -296,7 +343,7 @@ <% adors.moveFirst Do While Not adors.Eof - if adors("P_CHILD_SN") = "" then + if adors("P_CHILD_SN") = "" AND adors("USE_YN_CD") = "N" then %> <% @@ -377,6 +424,29 @@
장비번호 핸드폰번호 프로젝트상태 면접원 대여시작일 반납예정일
<%=adors("NO")%>" name="DEVICE_ID"/><%=adors("T_DEVICE_MODEL")%><%=adors("DEVICE_MODEL")%> <%=adors("T_NO")%><%=adors("T_PHONE_NO")%><%=adors("PHONE_NO")%> <%=iif(adors("P_CHILD_SN") = "", "", "[" & adors("P_CHILD_SN") & "] ")%><%=adors("P_SUBJECT")%><%=adors("USE_YN")%> <% if adors("P_CHILD_SN") <> "" Then if adors("MAN_ID") = "" Then @@ -233,10 +269,21 @@ <%=adors("USE_ED_DT")%> <% if adors("P_CHILD_SN") <> "" Then - if chk_user = true Then + if chk_user = true Or isAdminUser = true Then %> - "/>  - "/><% + "/> <% + if isAdminUser = true Then + %> + " data-device_id="<%=adors("ID")%>" data-use_yn="<%=adors("USE_YN_CD")%>" data-disuse_rsn_cd="<%=adors("DISUSE_RSN_CD")%>"/><% + Else + %> + "/><% + End if + End if + ElseIf adors("USE_YN_CD") = "X" Or adors("USE_YN_CD") = "N" Then + If isAdminUser = true Then + %> + " data-use_yn="<%=adors("USE_YN_CD")%>" data-disuse_rsn_cd="<%=adors("DISUSE_RSN_CD")%>"/><% End if end if %>
+ +
+ + + + + + + + + +
상태 + + + +
@@ -420,19 +490,22 @@ }); $(".all_ret_device_btn").click(function(){ - var deviceIDs = $("#device_status > tbody > tr:nth-child(n+2):visible > td:nth-child(9) > input.ret_device_btn").map(function(idx, obj){ return $(obj).data("device_id") }).toArray().join(","); + var deviceIDs = $("#device_status > tbody > tr:nth-child(n+2):visible > td:nth-child(10) > input.my_ret_btn").map(function(idx, obj){ return $(obj).data("device_id") }).toArray().join(","); if(deviceIDs == ""){ alert("보이는 기기 중 대여신청자가 본인인 기기가 없습니다."); return; } + if(confirm("화면에 보이는 모든 기기를 반납하시겠습니까?\n(대여신청자가 본인인 기기)")){ $.ajax({ url: './capi_device_return.asp', data: { - 'device_id' : deviceIDs + 'device_id' : deviceIDs, + 'use_yn' : 'N', + 'disuse_rsn_cd' : '' }, success: function(result){ - if(result == "1"){ // 성공 + if(result == "1"){ // 성공 location.reload(); }else{ alert("Web Service Error !!"); @@ -517,14 +590,36 @@ }); $(".ret_device_btn").click(function () { - if(confirm("반납처리하겠습니까?")){ + $("#ret_device_id").val($(this).data("device_id")); + + var curUseYn = $(this).data("use_yn"); + var curDisuseRsnCd = $(this).data("disuse_rsn_cd"); + + $("input[name=ret_use_yn]").prop("checked", false); + $("input[name=ret_use_yn][value='" + curUseYn + "']").prop("checked", true); + + if(curUseYn == "X"){ + $("#ret_disuse_rsn_row").show(); + $("#ret_disuse_rsn_cd").val(curDisuseRsnCd); + }else{ + $("#ret_disuse_rsn_row").hide(); + } + + deviceReturnDialog.dialog("open"); + }); + + $(".simple_ret_btn").click(function () { + var device_id = $(this).data("device_id"); + if(confirm("반납 하시겠습니까?")){ $.ajax({ url: './capi_device_return.asp', data: { - 'device_id' : $(this).data("device_id") + 'device_id' : device_id, + 'use_yn' : 'N', + 'disuse_rsn_cd' : '' }, success: function(result){ - if(result == "1"){ // 성공 + if(result == "1"){ // 성공 location.reload(); }else{ alert("Web Service Error !!"); @@ -554,6 +649,34 @@ of: window }); + deviceReturnDialog = $("#deviceReturnDialog").dialog({ + autoOpen: false, + modal: true, + resizable: false, + height: 220, + width: 400, + title: '상태변경', + close: function(){ clearDeviceReturnValue(); }, + buttons: { + "저장": deviceReturnSave, + "취소": deviceReturnCancel + } + }); + + deviceReturnDialog.dialog("option", "position", { + my: 'center', + at: 'center', + of: window + }); + + $("input[name=ret_use_yn]").change(function(){ + if($(this).val() == "X"){ + $("#ret_disuse_rsn_row").show(); + }else{ + $("#ret_disuse_rsn_row").hide(); + } + }); + $(".mod_device_btn").click(function () { deviceModDialog.dialog("open"); @@ -564,10 +687,10 @@ $("#mod_p_subject").val(projectStr); $("#mod_p_child_sn").val(p_child_sn); - var use_ed_dt = $("input[name=DEVICE_ID][VALUE='" + $(this).data("device_id") + "']").parents("tr").eq(0).find("td").eq(7).html(); + var use_ed_dt = $("input[name=DEVICE_ID][VALUE='" + $(this).data("device_id") + "']").parents("tr").eq(0).find("td").eq(8).html(); $("#mod_use_ed_dt").val(use_ed_dt); - var m_name = $("input[name=DEVICE_ID][VALUE='" + $(this).data("device_id") + "']").parents("tr").eq(0).find("td").eq(5).text(); + var m_name = $("input[name=DEVICE_ID][VALUE='" + $(this).data("device_id") + "']").parents("tr").eq(0).find("td").eq(6).text(); $("#mod_ori_m_name").text(m_name); $("#mod_beforeValue").val(p_child_sn+"||"+use_ed_dt+"||"+m_name); @@ -607,16 +730,20 @@ var selPrjVal = $("#selPrj").val(); var selUserVal = $("#selUser").val(); var selManVal = $("#selMan").val(); + var selStatusVal = $("#selStatus").val(); $("#device_status > tbody > tr:nth-child(n+2)").css("display", ""); $.each($("#device_status > tbody > tr:nth-child(n+2)"), function(idx, obj){ if($(this).children("td").eq(4).text() != selPrjVal && selPrjVal != ""){ $(this).css("display", "none"); } - if($(this).children("td").eq(9).text() != selUserVal && selUserVal != ""){ + if($(this).children("td").eq(10).text() != selUserVal && selUserVal != ""){ $(this).css("display", "none"); } - if($(this).children("td").eq(5).text() != selManVal && selManVal != ""){ + if($(this).children("td").eq(6).text() != selManVal && selManVal != ""){ + $(this).css("display", "none"); + } + if($(this).children("td").eq(5).text().indexOf(selStatusVal) == -1 && selStatusVal != ""){ $(this).css("display", "none"); } if(idx > 0 && $(this).children("td").length == 1){ @@ -670,18 +797,16 @@ $("#selMan").html(baseOption); $.each($("#device_status > tbody > tr:nth-child(n+2)"), function(idx, obj){ // $(obj).children("td").eq(4).text() - 프로젝트 - // $(obj).children("td").eq(9).text() - 대여신청자 - // $(obj).children("td").eq(5).text() - 면접원 - if($(obj).css("display") != "none"){ - if($("#selPrj").find("option[value='" + $(obj).children("td").eq(4).text() + "']").length == 0 && $(obj).children("td").eq(4).text() != ""){ - $("#selPrj").append(""); - } - if($("#selUser").find("option[value='" + $(obj).children("td").eq(9).text() + "']").length == 0 && $(obj).children("td").eq(9).text() != ""){ - $("#selUser").append(""); - } - if($("#selMan").find("option[value='" + $(obj).children("td").eq(5).text() + "']").length == 0 && $(obj).children("td").eq(5).text() != ""){ - $("#selMan").append(""); - } + // $(obj).children("td").eq(10).text() - 대여신청자 + // $(obj).children("td").eq(6).text() - 면접원 + if($("#selPrj").find("option[value='" + $(obj).children("td").eq(4).text() + "']").length == 0 && $(obj).children("td").eq(4).text() != ""){ + $("#selPrj").append(""); + } + if($("#selUser").find("option[value='" + $(obj).children("td").eq(10).text() + "']").length == 0 && $(obj).children("td").eq(10).text() != ""){ + $("#selUser").append(""); + } + if($("#selMan").find("option[value='" + $(obj).children("td").eq(6).text() + "']").length == 0 && $(obj).children("td").eq(6).text() != ""){ + $("#selMan").append(""); } }); sortSelect("selPrj", prevPrjVal); @@ -809,6 +934,13 @@ $("#mod_id").val(""); } + function clearDeviceReturnValue(){ + $("#ret_device_id").val(""); + $("input[name=ret_use_yn]").prop("checked", false); + $("#ret_disuse_rsn_row").hide(); + $("#ret_disuse_rsn_cd").val("01"); + } + function deviceMod(){ var mod_val = $("#mod_p_child_sn").val()+"||"+$("#mod_use_ed_dt").val()+"||"+($("#mod_t_m_name").text() == "" ? $("#mod_ori_m_name").text() : $("#mod_t_m_name").text()); if(mod_val == $("#mod_beforeValue").val()){ @@ -845,6 +977,45 @@ deviceModDialog.dialog("close"); } + function deviceReturnSave(){ + var use_yn = $("input[name=ret_use_yn]:checked").val(); + if(!use_yn){ + alert("상태를 선택해주세요."); + return; + } + var disuse_rsn_cd = ""; + if(use_yn == "X"){ + disuse_rsn_cd = $("#ret_disuse_rsn_cd").val(); + if(!disuse_rsn_cd){ + alert("대여불가 사유를 선택해주세요."); + return; + } + } + if(!confirm("상태를 변경하시겠습니까?")){ + return; + } + $.ajax({ + url: './capi_device_return.asp', + data: { + 'device_id' : $("#ret_device_id").val(), + 'use_yn' : use_yn, + 'disuse_rsn_cd' : disuse_rsn_cd + }, + success: function(result){ + if(result == "1"){ // 성공 + deviceReturnDialog.dialog("close"); + location.reload(); + }else{ + alert("Web Service Error !!"); + } + } + }); + } + + function deviceReturnCancel(){ + deviceReturnDialog.dialog("close"); + } + function deviceCancel3(){ clearDeviceSelect(); deviceSelectDialog.dialog("close"); @@ -883,8 +1054,7 @@ }, success: function(result){ if(result == "1"){ // 성공 - //location.reload(); - createSelect(); + location.reload(); }else{ alert("Web Service Error !!"); } diff --git a/management/personnel_card.asp b/management/personnel_card.asp index f9c5ed0..7b590b2 100644 --- a/management/personnel_card.asp +++ b/management/personnel_card.asp @@ -3,17 +3,7 @@