<% Dim p_sn project_document_flag = Request("project_document_flag") '--------------------------------------- 'p_sn만들기 query = "SELECT p_sn " query = query & "FROM T_PROJECT_BASE " query = query & "WHERE substring(p_sn, 0, 5) = '" & right("0" & year(date()), 2) & right("0" & month(date()), 2) & "' " query = query & " AND substring(p_sn, 5, 3) <> '000' " query = query & " AND substring(p_sn, 8, 1) <> '_' " '서브 프로젝트가 상위로 올라오는 것을 막음 query = query & "ORDER BY p_sn DESC " rsc.Open query, adoConn, 1 if rsc.RecordCount > 0 then if instr(1, rsc("p_sn"), "_") then p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & right("000" & int(left(right(rsc("p_sn"), 5), 3)) + 1, 3) else p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & right("000" & int(right(rsc("p_sn"), 3)) + 1, 3) end if else p_sn = right("0" & year(date()), 2) & right("0" & month(date()), 2) & "001" end if rsc.Close if request("p_sn") <> "" then p_sn = request("p_sn") Else p_sn = RIGHT(year(Now()), 2) & RIGHT("0" & month(Now()), 2) & "000" end if '프로젝트 기본 정보 가져오기 query = " SELECT p_sn, PB.p_cli_company_cd as p_cli_company_cd, PB.p_cli_per_cd as p_cli_per_cd, " query = query & " p_state, p_subject, p_cli_company_nm, CP.p_cli_depart as p_cli_depart, " query = query & " p_cli_per_nm, p_cli_per_com_tel, p_cli_per_tel, p_cli_per_email, p_contactor, PB.p_input_user, " query = query & " PB.p_client_type_cd as p_client_type_cd, p_total_cost, p_obtain_cost, p_cont_cost, p_decide_date, " query = query & " p_memo, p_state, pb.p_depart_dep as p_depart_dep , isnull(p_drop_reason, '') as p_drop_reason, " query = query & " isnull(p_cost_rate, '0') as p_cost_rate, p_cost_rate_chk " query = query & " FROM " query = query & " T_PROJECT_BASE PB LEFT OUTER JOIN V_CLIENT_COMP CC ON PB.p_cli_company_cd = CC.p_cli_company_cd " query = query & " LEFT OUTER JOIN V_CLIENT_PERSON CP ON PB.P_CLI_PER_CD = CP.P_CLI_PER_CD AND PB.p_cli_company_cd = CP.p_cli_company_cd " query = query & " LEFT OUTER JOIN T_CLIENT_TYPE_CD CTC ON PB.p_client_type_cd = CTC.p_client_type_cd " query = query & " WHERE p_sn = '"&p_sn& "'" rsc.Open query, adoConn, 1 '조사방법 가져오기 query = " SELECT TPM.* " query = query & " FROM T_PROJECT_METHOD TPM LEFT OUTER JOIN T_PROJECT_METHOD_CD TPMC ON TPM.p_method_cd = TPMC.p_method_cd " query = query & " WHERE p_sn = '"&p_sn& "' ORDER BY TPMC.p_gubn, TPMC.p_method_nm " rsa.Open query, adoConn, 1 '저장된 파일 가져오기 query = " select T.*, A.* from ( " query = query & " SELECT '001' as attach_gubun, COUNT(*) cnt FROM T_SYSTEM_ATTACH WHERE f_p_sn = '"&p_sn& "' AND f_use_yn = 'Y' AND f_work_type = '001' AND f_kind = '001' " query = query & " union all " query = query & " SELECT '002' as attach_gubun, COUNT(*) cnt FROM T_SYSTEM_ATTACH WHERE f_p_sn = '"&p_sn& "' AND f_use_yn = 'Y' AND f_work_type = '001' AND f_kind = '002' " query = query & " union all " query = query & " SELECT '003' as attach_gubun, COUNT(*) cnt FROM T_SYSTEM_ATTACH WHERE f_p_sn = '"&p_sn& "' AND f_use_yn = 'Y' AND f_work_type = '001' AND f_kind = '003' " query = query & " ) as T " query = query & " left outer join T_SYSTEM_ATTACH as A " query = query & " on T.attach_gubun = A.f_kind " query = query & " and A.f_p_sn = '"&p_sn& "' AND A.f_use_yn = 'Y' AND A.f_work_type = '001' " query = query & " order by attach_gubun, f_id " rsp.Open query, adoConn, 1 '화면 초기값 설정. '------------------------------------------------------------------------------------ '조사방법을 제외한 컬럼들의 초기값 p_cli_company_cd = "" '회사 코드 p_cli_per_cd = "" '담당자 코드 p_state = "" '프로젝트 현재 상태(K:제안, P:수주, 연기:D, 탈락 : X) p_subject = "" '프로젝트명 p_contactor = "" '발생 경로 p_cli_company_nm = "" '회사명 p_cli_depart = "" '부서명 p_cli_per_nm = "" '담당자 이름 p_cli_per_com_tel = "" '담당자 전화번호 p_cli_per_tel = "" '담당자 전화번호 p_cli_per_email = "" '담당자 이메일 p_client_type_cd = "" '업종 p_cont_cost = "" '예상 계약액 p_decide_date = "" '결정 예정일 p_memo = "" '메모 p_depart_dep = "" '입력한 부서 p_total_cost = "" '전체 수주금액(실제계약액) p_drop_reason = "" '탈락 사유 p_cost_rate = "0" '직접비율 (예상) p_cost_rate_chk = "" '직접비율 대표님 확인 여부 if rsc.RecordCount > 0 then if rsc("p_state") <> "" then p_cli_company_cd = rsc("p_cli_company_cd") p_cli_per_cd = rsc("p_cli_per_cd") p_contactor = rsc("p_contactor") p_state = rsc("p_state") p_subject = rsc("p_subject") p_cli_company_nm = rsc("p_cli_company_nm") p_cli_depart = rsc("p_cli_depart") p_cli_per_nm = rsc("p_cli_per_nm") p_cli_per_com_tel = rsc("p_cli_per_com_tel") p_cli_per_tel = rsc("p_cli_per_tel") p_cli_per_email = rsc("p_cli_per_email") p_client_type_cd = rsc("p_client_type_cd") p_depart_dep = rsc("p_depart_dep") insert_user = rsc("p_input_user") p_drop_reason = rsc("p_drop_reason") p_cost_rate = rsc("p_cost_rate") p_cost_rate_chk = rsc("p_cost_rate_chk") if rsc("p_total_cost") <> "" then tmp_len = len(rsc("p_total_cost")) for i = 1 to int(tmp_len) if i mod 3 = 1 and i <> 1 then p_total_cost = "," & p_total_cost end if p_total_cost = left(right(rsc("p_total_cost"),i), 1) & p_total_cost next end If '예상 계약액 ,수정 if rsc("p_obtain_cost") <> "" then tmp_len = len(rsc("p_obtain_cost")) for i = 1 to int(tmp_len) if i mod 3 = 1 and i <> 1 then p_cont_cost = "," & p_cont_cost end if p_cont_cost = left(right(rsc("p_obtain_cost"),i), 1) & p_cont_cost next end If if int(p_cont_cost) = 0 then p_cont_cost=1 end if p_decide_date = rsc("p_decide_date") p_memo = rsc("p_memo") end if end if '조사방법 초기값 Dim p_method_cd(17) Dim p_progress_status '조사방법에 아무것도 없을때 if rsa.recordCount > 0 then '기존 조사방법 저장 for i=1 to rsa.recordCount p_method_cd(i) = rsa("p_method_cd") p_sub_type = rsa("p_sub_type") p_progress_status = rsa("p_progress_status") rsa.MoveNext next else p_method_cd(1) = "0" p_progress_status = "" end if dim f_id() dim f_kind() dim ATTACH_FILENAME() Dim f_kind_001_cnt Dim f_kind_002_cnt Dim f_kind_003_cnt f_kind_001_cnt = 0 f_kind_002_cnt = 0 f_kind_003_cnt = 0 attach_file_count = rsp.recordCount If attach_file_count < 3 Then attach_file_count = 3 End if ReDim f_id(attach_file_count) ReDim f_kind(attach_file_count) ReDim ATTACH_FILENAME(attach_file_count) Dim f_kind_001_file_blank Dim f_kind_002_file_blank Dim f_kind_003_file_blank f_kind_001_file_blank = false f_kind_002_file_blank = false f_kind_003_file_blank = false '저장된 파일 초기값 if attach_file_count > 0 then for i=0 to attach_file_count-1 f_id(i) = "" ATTACH_FILENAME(i) = "" If i < rsp.recordCount Then If IsNull(rsp("f_id")) Then 'f_id 가 Null이면 그냥 건너뜀 Else f_id(i) = rsp("f_id") f_kind(i) = rsp("f_kind") ATTACH_FILENAME(i) = rsp("f_file_name") if rsp("f_kind") = "001" then f_kind_001_cnt = f_kind_001_cnt + 1 end if if rsp("f_kind") = "002" Then f_kind_002_cnt = f_kind_002_cnt + 1 end if if rsp("f_kind") = "003" Then f_kind_003_cnt = f_kind_003_cnt + 1 end If End if rsp.movenext End if Next If f_kind_001_cnt = 0 Then f_kind_001_cnt = 1 f_kind_001_file_blank = true End If If f_kind_002_cnt = 0 Then f_kind_002_cnt = 1 f_kind_002_file_blank = true End If If f_kind_003_cnt = 0 Then f_kind_003_cnt = 1 f_kind_003_file_blank = true End if Dim f_kind_001_list() Dim f_kind_002_list() Dim f_kind_003_list() ReDim f_kind_001_list(f_kind_001_cnt, 3) ReDim f_kind_002_list(f_kind_002_cnt, 3) ReDim f_kind_003_list(f_kind_003_cnt, 3) tmp_001_cnt = 0 tmp_002_cnt = 0 tmp_003_cnt = 0 For i = 0 To attach_file_count - 1 If f_kind(i) = "001" Then f_kind_001_list(tmp_001_cnt, 0) = f_id(i) f_kind_001_list(tmp_001_cnt, 1) = f_kind(i) f_kind_001_list(tmp_001_cnt, 2) = ATTACH_FILENAME(i) tmp_001_cnt = tmp_001_cnt + 1 End If If f_kind(i) = "002" Then f_kind_002_list(tmp_002_cnt, 0) = f_id(i) f_kind_002_list(tmp_002_cnt, 1) = f_kind(i) f_kind_002_list(tmp_002_cnt, 2) = ATTACH_FILENAME(i) tmp_002_cnt = tmp_002_cnt + 1 End If If f_kind(i) = "003" Then f_kind_003_list(tmp_003_cnt, 0) = f_id(i) f_kind_003_list(tmp_003_cnt, 1) = f_kind(i) f_kind_003_list(tmp_003_cnt, 2) = ATTACH_FILENAME(i) tmp_003_cnt = tmp_003_cnt + 1 End If next end if '------------------------------------------------------------------------------------ rsa.close rsc.close rsp.close %>
"/> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " /> " />
<% if p_total_cost <> "" then %> <% end if %> <% Dim file_index file_index = 0 ''' response.write "f_kind_001_list Length : " & UBound(f_kind_001_list) %> <% If UBound(f_kind_001_list) > 0 Then For i = 1 To UBound(f_kind_001_list) -1 file_index = file_index + 1 %> _tr> <% Next End If %> <% file_index = file_index + 1 %> <% If UBound(f_kind_002_list) > 0 Then For i = 1 To UBound(f_kind_002_list) -1 file_index = file_index + 1 %> _tr> <% Next End If %> <% file_index = file_index + 1 %> <% If UBound(f_kind_003_list) > 0 Then For i = 1 To UBound(f_kind_003_list) -1 file_index = file_index + 1 %> _tr> <% Next End If if request("cutmenu") <> "1" then %> <% end if %>
제안 등록
※ 제안서의 진행상태가 [제안] -> [수주] 되는 시점은
  수행계획서가 결재 완료되는 시점입니다.
제안 번호 <% If Right(p_sn, 3) = "000" Then %> 제안 번호는 저장시 자동 생성 됩니다. <% End If %>
제안명 " >
※ 업체명_용역명(업체명과 용역명 사이에 언더바 사용) 예시-> 광동제약_브랜드컨셉 수립
발생 경로
클라이언트
회사
부서
담당자 이름
회사 전화번호
담당자
휴대폰
이메일
업종
조사방법 <% dim tmp_index q = "SELECT * " q = q & "FROM T_PROJECT_METHOD_CD " q = q & " where p_use_yn = 'Y' " '//-- 2020-10-21 12:01:10 q = q & " and p_method_yn not in ('17','15') " '//-- 2020-10-21 12:01:10 q = q & " ORDER BY p_gubn, p_method_nm " 'response.write q rsp.Open q, adoConn, 1 i=0 j=1 tmp_index=1 do while not rsp.eof i=i+1 if rsp("p_gubn") = "1" Then %> <% if i mod 5 = 0 then %> <% end if end if if rsp("p_gubn") = "2" Then if tmp_index <> rsp("p_gubn") Then tmp_index = rsp("p_gubn") %> <% end if %> <% if i mod 5 = 0 then %> <% end if end if if rsp("p_gubn") = "3" Then if tmp_index <> rsp("p_gubn") Then tmp_index = rsp("p_gubn") %> <% end if %> <% if i mod 5 = 0 then %> <% end if end if rsp.movenext loop rsp.close %>
정 량
" onClick="chkboxSum(this)" <% if p_method_cd(j) = rsp("p_method_cd") then j=j+1 %> checked <% end if %>><%=rsp("p_method_nm") %>
정 성
" onClick="chkboxSum(this)" <% if p_method_cd(j) = rsp("p_method_cd") then j=j+1 %> checked <% end if %>><%=rsp("p_method_nm") %>
D e s k w o r k
" onClick="chkboxSum(this)" <% if p_method_cd(j) = rsp("p_method_cd") then j=j+1 %> checked <% end if %>><%=rsp("p_method_nm") %>
예상계약액(수주예상금액) 원 (VAT 별도)
실제계약액(전체수주금액) <%=p_total_cost %> 원 (VAT 별도)
예상직접비율(%) <% if cint(p_cost_rate) >= 55 then %>( 대표이사 확인여부 : <% response.Write iif(p_cost_rate_chk = "확인", "확인", "미확인") %> )<% end if %>
결정 예정일
비고
첨부파일 ※ 원본 파일(엑셀, 워드, 파워포인트, 한글) 첨부 가능, pdf파일은 재사용이 불가하므로 첨부 불가
RFP등 <% If UBound(f_kind_001_list) > 0 Then %> <% Else %> <% End If %>      저장된 파일 : <% If UBound(f_kind_001_list) > 0 Then %> <% if f_kind_001_list(0, 0) <> "" then %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% else %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% end if %> <% end if %>
      저장된 파일 :
제안서 <% If UBound(f_kind_001_list) > 0 Then %> <% Else %> <% End If %>      저장된 파일 : <% If UBound(f_kind_002_list) > 0 Then %> <% if f_kind_002_list(0, 0) <> "" then %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% else %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% end if %> <% end if %>
발생경로 -> 제안경쟁,공개입찰 *첨부필수
      저장된 파일 :
견적서 <% If UBound(f_kind_003_list) > 0 Then %> <% Else %> <% End If %>      저장된 파일 : <% If UBound(f_kind_003_list) > 0 Then %> <% if f_kind_003_list(0, 0) <> "" then %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% else %> <% if Session("Depart_Code") = p_depart_dep and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %> <% End if%> <% end if %> <% end if %>
발생경로 -> 수의계약,가격입찰 *첨부필수
      저장된 파일 :
<% if Request("p_sn") = "" then %> <% else %> <% '같은 부서 or 원성훈 상무님의 경우 1본부 or 이주황 상무님의 경우 2본부 or 프로젝트 진행상태가 없어야 하며 or 상태값이 k이어야 한다. if ( _ Session("Depart_Code") = p_depart_dep _ or (Session("User_Number") = "20000201" and (p_depart_dep = "31" or p_depart_dep = "32" or p_depart_dep = "33" or p_depart_dep = "34")) _ or (Session("User_Number") = "20140702" and (p_depart_dep = "35" or p_depart_dep = "36" or p_depart_dep = "37" or p_depart_dep = "38" )) _ or (Session("User_Number") = "20160603" and (p_depart_dep = "39" or p_depart_dep = "30")) _ ) and (isnull(p_progress_status) or p_progress_status = "" ) And p_state = "K" then %>       <% '-- 연기:D 일때도 변경할수 있도록 처리(20170719) ElseIf ( _ Session("Depart_Code") = p_depart_dep _ or (Session("User_Number") = "20000201" and (p_depart_dep = "31" or p_depart_dep = "32" or p_depart_dep = "33" or p_depart_dep = "34")) _ or (Session("User_Number") = "20140702" and (p_depart_dep = "35" or p_depart_dep = "36" or p_depart_dep = "37" or p_depart_dep = "38" )) _ or (Session("User_Number") = "20160603" and (p_depart_dep = "39" or p_depart_dep = "30")) _ ) And p_state = "D" then %>      


현재 [제안 보류] 상태 입니다


<% ElseIf ( _ (insert_user = "20000201" And p_depart_dep = "0" And ( Session("Depart_Code") = "31" Or Session("Depart_Code") = "32" Or Session("Depart_Code") = "33" Or Session("Depart_Code") = "34")) _ Or (insert_user = "20140702" And p_depart_dep = "0" And ( Session("Depart_Code") = "35" Or Session("Depart_Code") = "36" Or Session("Depart_Code") = "37" Or Session("Depart_Code") = "38")) _ Or (insert_user = "20160603" And p_depart_dep = "0" And ( Session("Depart_Code") = "39" or Session("Depart_Code") = "30")) _ ) Then %>       <% ElseIf p_state = "X" and _ Session("Depart_Code") = p_depart_dep _ or (Session("User_Number") = "20000201" and (p_depart_dep = "31" or p_depart_dep = "32" or p_depart_dep = "33" or p_depart_dep = "34")) _ or (Session("User_Number") = "20140702" and (p_depart_dep = "35" or p_depart_dep = "36" or p_depart_dep = "37" or p_depart_dep = "38")) or (Session("User_Number") = "20160603" and (p_depart_dep = "39" or p_depart_dep = "30")) and (isnull(p_progress_status) or p_progress_status = "" ) _ then %> <% end if %> <% if Session("Depart_Code") = "18" then '임시로 수정버튼 보이도록 %>   <% end if %> <% end if %>
<% if p_state = "X" then %>
탈락 사유
<%=replace(p_drop_reason, chr(13), "
") %>
<% end if %> " />