123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812 |
- <%--
- - Author(s) : Kim Myung HO
- - Date : 2014.08.11
- - Description: 계약 결과 작성
- --%>
-
- <%@page import="java.sql.Clob"%>
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="com.udapsoft.waf.common.util.*" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ page import="kr.co.hsnc.common.config.WAFConfig" %>
- <%@ include file="/jsp/work/taglib.jsp" %>
- <%@ page import="kr.co.hsnc.common.util.Formatter"%>
- <%@page import="java.net.URLEncoder"%>
- <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = storage.getUser();
- // RowSet CorpRowSet = storage.getRowSet("CorpRowSet");
- ValueObject ContInfo = storage.getValueObject("ContInfo");
- /*계약서식 정보 */
- RowSet template = storage.getRowSet("template");
-
- /*계약서식 FILE */
- RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");
-
- /*보증 정보 LIst */
- RowSet warrList = storage.getRowSet("warrList");
- /*계약 구매 내역 목록*/
- RowSet itemList = storage.getRowSet("itemList");
-
- /*인지세 구분*/
- RowSet stampList = storage.getRowSet("stampRowSet");
- %>
- <LINK href="/css/cont/cont_style.css" rel="stylesheet" type="text/css">
- <script language="javascript" src="/js/cont/cont_util.js"></script>
- <script language="javascript" src="/js/cont/lib.validate.js"></script>
- <SCRIPT language="JavaScript">
- /*예약함수*/
- var sheet1;
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
- var payCallNum = 3; //대금계획에서 화면 이동 정의
-
- function _onReady(){
-
- /* STAMP_DUTY, PROMISE_DOC 인클루드 페이지 기능 */
- gridInit2(sheet2);
- gridInit3(sheet3);
- doSearchStamp();
- doSearchPromise();
-
- if(!(jQuery("#STATUS_CD").val() == '20' || jQuery("#STATUS_CD").val() == '30' || jQuery("#STATUS_CD").val() == '50')){
- jQuery("#p_issue_gb").attr("disabled",false);
- jQuery("#p_promise_gb").attr("disabled",false);
-
- if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""){
- //jQuery("#btnAdd").hide();
- jQuery("#btnSaveStamp").hide();
- }else{
- //jQuery("#btnAdd").show();
- jQuery("#btnSaveStamp").show();
- }
-
- if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""){
- //jQuery("#btnPromiseAdd").hide();
- jQuery("#btnSavePromise").hide();
- }else{
- //jQuery("#btnPromiseAdd").show();
- jQuery("#btnSavePromise").show();
- }
- }else{
- jQuery("#p_issue_gb").attr("disabled",true);
- jQuery("#p_promise_gb").attr("disabled",true);
-
- if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
- //jQuery("#btnAdd").hide();
- jQuery("#btnSaveStamp").hide();
- }else{
- //jQuery("#btnAdd").show();
- jQuery("#btnSaveStamp").show();
- }
-
- if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
- //jQuery("#btnPromiseAdd").hide();
- jQuery("#btnSavePromise").hide();
- }else{
- //jQuery("#btnPromiseAdd").show();
- jQuery("#btnSavePromise").show();
- }
- }
-
- /**
- * Application Initialize
- */
- checkAuthority();
-
- jQuery("#btnChange").click(function() {
- if (confirm("변경 계약을 진행 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("CHANGE_CONT");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "CHANGE_CONT", f);
- }
- });
- jQuery("#btnBack").click(function() {
- if (confirm("ERP계약을 삭제하고, 계약현황으로 돌아갑니다. \n계속 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("CONT_BACK");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "CONT_BACK", f);
- }
- });
- jQuery("#btnSavePayItem").click(function() {
- //분개유형 DEFAULT(-선택-)일 경우 팝업 출력(2020.12.28)
- if(jQuery("#acct_gb").val() == "0"){
- alert("분개유형을 선택해 주시기 바랍니다.");
- return;
- }else if (confirm("분개유형을 저장 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("SAVE_PAYITEM");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "SAVE_PAYITEM", f);
- }
- });
- //2017.03.08 업체담당자 HP, email 수정
- jQuery("#btnChgSuppInfo").click(function() {
- if (confirm("담당자 정보를 수정 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("CHG_SUPP_INFO");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "CHG_SUPP_INFO", f);
- }
- });
- jQuery("#btnPaySave").click(function() {
- //대금 계획 체크
- if(!paySaveChk()){
- return;
- }
- if (confirm("대금계획을 저장 하시겠습니까?")){
- payPlanSave(); //대금 계획 저장
- }
- });
- //계약 내역 팝업
- jQuery("#btnItem").click(function() {
- var win_id = "ItemPop";
- var editYN = "N";
- if(document.getElementById("STATUS_CD").value=="10"){editYN="Y";}
- var link = "/cont/purchase/ItemPopup.screen";
- link += "?pop_win_id="+win_id+"&PUR_CONT_MOD_ID="+$("#PUR_CONT_MOD_ID").val()+"&PUR_CONT_ID="+$("#PUR_CONT_ID").val()+"&digit="+$("#sosuNum").val()+"&curr_std_nm="+encodeURI(encodeURIComponent($("#CURR_STD_NM").val()),"UTF-8")+"&editYN="+ editYN;
- fLayerPop(win_id, link, 950,500, '','', 'NO');
- });
- //고용보험 신청서
- jQuery("#btnInsur").click(function(){
- var f = document.form1;
- jQuery("#fevent").val("SAVE_INSUR");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "SAVE_INSUR", f);
- });
-
- $("#corp_add").click(function(){
- var win_id = "corp";
- var outitem = "";
- var link = "/common/corp/SuppChoicePop.screen";
- link += "?pop_win_id="+win_id+"&BID_KIND=P";
- fLayerPop(win_id, link, 800,400, '','', 'NO');
- });
-
- $.test = function(resultVal){
- $("#IN_CORP_ID").val(resultVal[0][0]);
- $("#IN_CORP_NAME").html(resultVal[2][0]);
- setTimeout(function(){ fLayerPopClose('corp');},100);
- }
-
- $("#btnAdd").click(function() {
- if($(".addPay").css("display") == "none"){
- $(".addPay").show();
- $("#btnAddIn").html("계약추가취소");
-
- } else {
- $(".addPay").hide();
- $("#btnAddIn").html("계약추가");
- }
- });
-
- $("#btnAddPay").click(function() {
- if (confirm("계약을 추가 하시겠습니까?")){
- if($("#IN_ORD_DOC_NO").val()==""){
- alert("신규계약번호를 입력 해주세요.");
- return;
- }
- if($("#IN_CORP_ID").val()==""){
- alert("업체를 추가 해주세요.");
- return;
- }
- var f = document.form1;
- jQuery("#fevent").val("ADD_PAY");
- submitXmlRequest("/cont/purchase/ContResult_form.screen", "ADD_PAY", f);
- }
- });
- }
-
- //자동로그인 기능
- function f_gologin(login_id,login_pw){
- var f = document.form1;
- if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
- dlgAlert("User who logged in as administrator only can do automatic log-in.");
- return;
- }
-
- f.login_id.value = login_id;
- f.login_pw.value = login_pw;
-
- if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
- alert("Log-in is being processed.");
- };
-
- }
- function goListProc(){
- var f = document.form1;
- f.fevent.value ="";
- f.action = "/cont/purchase/ContResultList.screen";
- f.target = "_self";
- f.submit();
- }
-
- function doResult(resultObj) {
- try {
- if( resultObj.getRequestEvent() == "CHANGE_CONT") {
- if( resultObj.getSuccess() ) {
- alert("변경 계약이 처리 되었습니다.\n\n변경계약 목록에서 계약서를 작성 해 주시기 바랍니다.");
- //location.href="/cont/purchase/ContTargetList.screen?ChgCont=Y"; 2019.06.18 수정 ContChgRcvList
- location.href="/cont/purchase/ContChgRcvList.screen";
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "SAVE_PAYITEM") {
- if( resultObj.getSuccess() ) {
- alert("분개유형이 저장 되었습니다.");
- location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "CHG_SUPP_INFO") {
- if( resultObj.getSuccess() ) {
- alert("담당자 정보가 수정 되었습니다.");
- location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "ADD_PAY") {
- if( resultObj.getSuccess() ) {
- alert("계약이 추가 되었습니다.");
- location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "SAVE_INSUR"){ //고용보험 신청
- if(resultObj.getSuccess()){
- var f = document.form1;
- f.fevent.value ="";
- f.action = "/cont/purchase/ContResultInsur.screen";
- f.target = "_self";
- f.submit();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "CONT_BACK") {
- if( resultObj.getSuccess() ) {
- alert("계약이 취소되었습니다.");
- location.href="/cont/purchase/ContIngList.screen";
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "TRANS_PAY_YN") {
- if( resultObj.getSuccess() ) {
- alert("대금여부가 변경 되었습니다.");
- location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
-
- document.form1.isSubmit = false;
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
- //첨부파일
- function doAttachFileDiv(obj) {
- if(obj==''){
- alert("저장을 한 후 파일을 첨부할 수 있습니다.");
- }
- else if(obj != ''){
- viewFileListNew('PUR_CONT_MOD_ID', obj.value, document.getElementById("attach_file_view"), "Y", "cont/purchase/<%=ContInfo.get("PUR_CONT_MOD_ID")%>");
- }
- }
- /**
- * 첨부파일 예약 함수
- */
- function fileDown(file_id){
- var url="/common/file/FileDownloadServlet";
- url += "?file_id=" + file_id;
-
- window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
- }
-
- function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
- var editFile = "";
- if(obj==''){
- alert("After you have saved, you can attach a file.");
- }
- else if(obj != ''){
- if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="Y";}
- if('<%= user.get("ACCT_TYPE_CODE")%>' == "ADMIN"){
- editFile = "Y";
- }
- viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contPurWarrPopup");
- }
- }
-
- //보증정보팝업 호출
- function popContWarr(wG, wSeq, wCauseCd) {
-
- var win_id = "contPurWarrPopup";
- var param = "";
- var param = "?purContModId=" + jQuery("#PUR_CONT_MOD_ID").val();
- var param = param + "&warrGubun=" + wG;
- var param = param + "&warrSeq=" + wSeq;
- var param = param + "&causeCode=" + wCauseCd;
- var param = param + "&viewDiv=CONT";
- var param = param + "&pop_win_id=" + win_id;
- var param = param + "&sModule=EB";
-
- var url = "/portal/guar/contPurWarrPopup.screen"+param;
-
- fLayerPop(win_id, url, 560,350, '','', 'NO');
- }
- //보증정보팝업 종료후 액션
- function popContWarrClose(returnValue){
- if(returnValue == null)
- setTimeout(function(){fLayerPopClose('contPurWarrPopup');},100);
- if(returnValue[0] == 0){
- setTimeout(function(){fLayerPopClose('contPurWarrPopup');},100);
- location.reload();
- }
- }
- /*대금 계획 때문에 필요담당자 호출*/
- var pCallPop = "";
- function SearchUser(pGuBun){
- pCallPop = pGuBun;
- var win_id = "_searchUserPopup";
- var link = "/lib/dlgSearchUserPop.screen";
- link += "?pop_win_id="+win_id;
- link += "&deptNameYn=N";
- fLayerPop(win_id, link, 700,400, '', '', 'NO');
- }
- /*담당자 호출 Return Value 처리*/
- function SearchUserClose(result){
- if(result != null){
- if(pCallPop == "Sheet"){
- sheet1.SetCellValue(clickRow, "VP_CHK_EMPNO", result[9]); //밴더프린트 담당자 아이디
- sheet1.SetCellValue(clickRow, "VP_CHK_EMPNM", result[1]); //밴더프린트 담당자명
- }
- if(pCallPop == "Sheet2"){
- sheet1.SetCellValue(clickRow, "PLAN_APPR_CHK_EMPNO", result[9]); //설계평가 담당자 아이디
- sheet1.SetCellValue(clickRow, "PLAN_APPR_CHK_EMPNM", result[1]); //설계평가 담당자명
- }
- }
- fLayerPopClose('_searchUserPopup');
- }
-
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type="hidden" name="fevent" id="fevent" value="<%= params.get("fevent") %>">
- <INPUT type="hidden" name="acct_id" value="<%= params.get("acct_id") %>">
- <!-- 검색 조건 시작-->
- <INPUT type="hidden" name="p_dept_cd" value="<%= params.get("p_dept_cd") %>">
- <INPUT type="hidden" name="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
- <INPUT type="hidden" name="p_dealer_nm" value="<%= params.get("p_dealer_nm") %>">
- <INPUT type="hidden" name="p_cont_status" value="<%= params.get("p_cont_status") %>">
- <INPUT type="hidden" name="ContFromDt" value="<%= params.get("ContFromDt") %>">
- <INPUT type="hidden" name="ContToDt" value="<%= params.get("ContToDt") %>">
- <INPUT type="hidden" name="p_build_nm" value="<%= params.get("p_build_nm") %>">
- <INPUT type="hidden" name="p_cont_no" value="<%= params.get("p_cont_no") %>">
- <INPUT type="hidden" name="p_mr_no" value="<%= params.get("p_mr_no") %>">
- <INPUT type="hidden" name="p_auto_search" id="p_auto_search" value="<%= params.get("p_auto_search") %>">
- <!-- 검색 조건 끝-->
- <INPUT type="hidden" name="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
- <INPUT type="hidden" name="PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>">
- <INPUT type="hidden" name="PUR_CONT_ID" value="<%=ContInfo.get("PUR_CONT_ID")%>">
- <INPUT type="hidden" name="O_CORP_ID" value="<%=ContInfo.get("O_CORP_ID")%>">
- <INPUT type="hidden" name="C_CORP_ID" value="<%=ContInfo.get("C_CORP_ID")%>">
- <INPUT type="hidden" name="STATUS_CD" value="<%=ContInfo.get("STATUS_CD")%>">
- <INPUT type="hidden" name="O_VENDCD" value="<%=ContInfo.get("O_VENDCD")%>">
- <INPUT type='hidden' name="CURR_STD_NM" value="<%= ContInfo.get("CURR_STD_NM") %>">
- <!-- 계약서PDF정보 START-->
- <INPUT type="hidden" name="TEMPLATE_CD" value="<%=ContInfo.get("TEMPLATE_CD") %>">
- <INPUT type="hidden" name="CON_DOC_NO" value="<%=ContInfo.get("CON_DOC_NO") %>">
- <INPUT type="hidden" name="MOD_NO" value="<%=ContInfo.get("MOD_NO") %>">
- <INPUT type="hidden" name="PDF_FILE_CNT" value="<%=template.size()%>">
- <INPUT type="hidden" name="TRUE_RANDOM" value="<%=ContInfo.get("TRUE_RANDOM") %>">
- <!-- 계약서PDF정보 END-->
- <!--서명 데이터 정보 START-->
- <INPUT type='hidden' name="CONT_HASH" value="<%=ContInfo.get("CONT_HASH") %>">
- <INPUT type='hidden' name="CONT_SIGNDATA" value="">
- <INPUT type='hidden' name="CONT_SIGNDN" value="">
- <INPUT type='hidden' name="signeddata" value="">
- <INPUT type="hidden" name="O_REG_NO" value="<%=ContInfo.get("O_REG_NO") %>">
- <INPUT type="hidden" name="DEMANDED_ID" value="<%=ContInfo.get("DEMANDED_ID") %>">
- <!-- 제목 및 버튼 -->
- <table width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div align="left" id="title">
- <ul>
- <li>구매_계약 상세</li>
- </ul>
- </div>
- </th>
- <td align="right">
- <%if(ContInfo.get("DIV_PO_YN").equals("Y")&&user.get("ACCT_TYPE_CODE").equals("ADMIN")){%>
- <span class="btnSearch center" id="btnAdd"><a id="btnAddIn" href="javascript:void(0);">계약추가</a></span>
- <%} %>
- <%-- <% 2018.12.27 더존에서 변경계약시작 && !ContInfo.get("DIV_PO_YN").equals("Y") ContInfo.get("DIV_PO_YN").equals("Y") &&
- if (ContInfo.get("CON_CLS_YN").equals("9") && ContInfo.get("MOD_NO").equals(ContInfo.get("MAX_MOD_NO")) && "0".equals(ContInfo.get("CHG_CNT")) ){
- %>
- <span class="btnSearch center" id="btnChange"><a href="javascript:void(0);">변경계약작성</a></span> && "0".equals(ContInfo.get("CHG_CNT") --%>
- <%
- if (ContInfo.get("CON_CLS_YN").equals("9") && ContInfo.get("MOD_NO").equals(ContInfo.get("MAX_MOD_NO")) ){
- if ( user.get("right_name").equals("PURCHASE") || user.get("right_name").equals("ADMIN NEW") ){%>
- <%if(!ContInfo.get("DIV_PO_YN").equals("Y")){%>
- <span class="btnSearch center" id="btnChange"><a href="javascript:void(0);">변경계약작성</a></span>
- <%} %>
- <span class="btnSearch center" id="btnBack"><a href="javascript:void(0);">계약취소</a></span>
- <%}
- } %>
- <span class="btnSearch center" id="btnItem"><a href="javascript:void(0);">계약상품내역</a></span>
- <span class="btnSearch center" id="btnList"><a href="javascript:goListProc();">목록</a></span>
- <span class="btnSearch center" id="btnInsur"><a href="javascript:void(0);">고용보험 신청서</a></span>
- </td>
- </tr>
- </table>
- <div class="addPay" style="display: none;">
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">추가계약정보</span>
- </div>
- <div class="application-location" style="padding-bottom:5px;">
- <span align="right" class="btnSearch center" id="btnAddPay"><a align="right" href="javascript:void(0);">생성</a></span>
- </div>
- </div>
- <TABLE class="form-table">
- <colgroup>
- <col width="120px" />
- <col width="24%"/>
- <col width="120px" />
- <col/>
- </colgroup>
- <TR height="25">
- <TH>신규계약번호</TH>
- <TD><input type="text" id="IN_ORD_DOC_NO" value="<%=ContInfo.get("ORD_DOC_NO")%>" style="width:250px;"></TD>
- <TH>업체명</TH>
- <TD><span id="IN_CORP_NAME" style="display:inline-block; width: 40%;"></span><span class="btnSearch center" id="corp_add"><a href="javascript:void(0);">업체추가</a></span></TD>
- </TR>
- </TABLE>
- <input type="hidden" id="IN_CORP_ID" value=""/>
- <input type="hidden" id="IN_PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>"/>
- <input type="hidden" id="IN_DEPT_CD" value="<%=ContInfo.get("DEPT_CD")%>"/>
- </div>
- <%
- /*
- 계약 정보를 한페이지로 만들어서 include 시킴 (2014-08-14) 김명호
- */
- String isViewWrite = "V";
- String finalYn = "Y";
- %>
- <%@ include file="/jsp/ko_KR/buyer/cont/purchase/ContInfo.jsp" %>
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">계약정보</span>
- </div>
- <div style="text-align:center;">
- </div>
- </div>
- <%if (template.size() == 0) { %>
- <input name="prepay_amt" id="prepay_amt" type="hidden" value="<%=ContInfo.get("prepay_amt")%>" />
- <input name="mid_amt" id="mid_amt" type="hidden" value="<%=ContInfo.get("mid_amt")%>" />
- <input name="rmdr_amt" id="rmdr_amt" type="hidden" value="<%=ContInfo.get("rmdr_amt")%>" />
- <TABLE class="form-table">
- <colgroup>
- <col width="120px" />
- <col width="24%"/>
- <col width="120px" />
- <col width="24%"/>
- <col width="120px" />
- <col/>
- </colgroup>
- <TR height="25">
- <TH>계약일자</TH>
- <TD>
- <%= InputText.get("ord_con_date", ContInfo.get("ord_con_date"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
- <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ord_con_date');" -->
- </TD>
- <TH>납품기한</TH>
- <TD>
- <%= InputText.get("ORD_START_DATE", ContInfo.get("ORD_START_DATE"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
- <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ORD_START_DATE');" -->
- ~
- <%= InputText.get("ORD_END_DATE", ContInfo.get("ORD_END_DATE"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
- <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ORD_END_DATE');" -->
- </TD>
- <TH>통화구분</TH>
- <TD><%= InputText.get("CURRENCY_GB", ContInfo.get("CURRENCY_GB"), 96, 20, "required,desc=대표자명,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- </TR>
- <TR height="25">
- <TH>계약금액</TH>
- <TD><%= InputText.get("ORD_AMT", Formatter.formatCurrency(ContInfo.get("ORD_AMT")), 96, 100, "desc=계약금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","currinc") %></TD>
- <TH>공급가</TH>
- <TD><%= InputText.get("ORD_SUPPLY_AMT", Formatter.formatCurrency(ContInfo.get("ORD_SUPPLY_AMT")), 96, 100, "desc=공급가,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right","number") %></TD>
- <TH>부가세</TH>
- <TD><%= InputText.get("ORD_SURTAX_AMT", Formatter.formatCurrency(ContInfo.get("ORD_SURTAX_AMT")), 96, 100, "required,desc=부가세,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","number") %></TD>
- </TR>
- <TR height="25">
- <TH>계약이행 보증율</TH>
- <TD><%= InputText.get("CON_GUAR_AMT_RATE", ContInfo.get("CON_GUAR_AMT_RATE"), 91, 100, "required,desc=계약이행보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %> %</TD>
- <TH>보증금액</TH>
- <TD><%= InputText.get("CON_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("CON_GUAR_AMT")), 96, 100, "required,desc=계약이행보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
- <TH>보증기간</TH>
- <TD><%= InputText.get("CON_GUAR_TERM", ContInfo.get("CON_GUAR_TERM"), 96, 100, "required,desc=계약이행보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- </TR>
- <TR height="25">
- <TH>선급금 보증율</TH>
- <TD><%= InputText.get("PREPAY_GUAR_AMT_RATE", ContInfo.get("PREPAY_GUAR_AMT_RATE"), 91, 100, "required,desc=선급금 보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %> %</TD>
- <TH>보증금액</TH>
- <TD><%= InputText.get("PREPAY_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("PREPAY_GUAR_AMT")), 96, 100, "required,desc=선급금보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
- <TH>선급금액</TH>
- <TD><%= InputText.get("PREPAY_AMT", Formatter.formatCurrency(ContInfo.get("PREPAY_AMT")), 96, 100, "required,desc=선급금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","number") %></TD>
- </TR>
- <TR height="25">
- <TH>하자보수 보증율</TH>
- <TD><%= InputText.get("DEF_GUAR_AMT_RATE", ContInfo.get("DEF_GUAR_AMT_RATE"), 91, 100, "required,desc=하자보수보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %> %</TD>
- <TH>보증금액</TH>
- <TD><%= InputText.get("DEF_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("DEF_GUAR_AMT")), 96, 100, "required,desc=하자보수보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
- <TH>보증기간</TH>
- <TD><%= InputText.get("DEF_GUAR_TERMS", ContInfo.get("DEF_GUAR_TERMS"), 96, 100, "required,desc=하자보수보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- </TR>
- <TR height="25">
- <TH>인도조건</TH>
- <TD>
- <INPUT type='hidden' name="LEAD_COND_GB" value="<%=ContInfo.get("LEAD_COND_GB") %>">
- <%= InputText.get("LEAD_COND_GB_NM", ContInfo.get("LEAD_COND_GB_NM"), 96, 100, "required,desc=인도조건,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- <TH>납품장소</TH>
- <TD><%= InputText.get("LEAD_PLACE", ContInfo.get("LEAD_PLACE"), 96, 100, "required,desc=납품장소,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- <TH>지체상금</TH>
- <TD><%= InputText.get("DEL_RATE_GB", ContInfo.get("DEL_RATE_GB"), 96, 100, "required,desc=하자보수보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
- </TR>
- <TR height="25">
- <TH>특이사항</TH>
- <TD colspan="5">
- <textarea name="con_display_txt" class="input_n" style="width:100%" rows="6" hname="기타사항" ><%=ContInfo.get("con_display_txt") %></textarea>
- </TD>
- </TR>
- <!-- 계약정보 : 종료 -->
- </table>
- <%
- if(itemList.size()>0){
- %>
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">상품정보</span>
- </div>
- <div style="text-align:center;">
- </div>
- </div>
- <TABLE class="list-form-table">
- <colgroup><col width="60"><col width="*"><col width="15%"><col width="15%"><col width="15%"><col width="15%"><%if(ContInfo.get("DIV_PO_YN").equals("N")){%><col width="*"><%} %></colgroup>
- <tr>
- <th>NO</th>
- <th>품명</th>
- <th>규격</th>
- <th>단위</th>
- <th>수량(톤)</th>
- <th>단가</th>
- <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
- <th>금액(원)</th>
- <%} %>
- </tr>
- <%
- double sum_qty=0;
- double sum_amt=0;
- for(int i=0;i<itemList.size();i++){
- sum_qty = sum_qty + Double.parseDouble(itemList.getRow(i).get("ITEM_QTY"));
- sum_amt = sum_amt + Double.parseDouble(itemList.getRow(i).get("SUM_AMT"));
- %>
- <tr>
- <td style="text-align:right"><%=i+1%></td>
- <td><%=itemList.getRow(i).get("ITEM_NAME")%></td>
- <td><%=itemList.getRow(i).get("ITEM_SPEC")%></td>
- <td><%=itemList.getRow(i).get("ITEM_UNIT_NM")%></td>
- <td style="text-align:right;"><%= ContInfo.get("DIV_PO_YN").equals("N") ? Formatter2.currency(itemList.getRow(i).get("ITEM_QTY")):"1"%> </td>
- <td style="text-align:right;"><%=Formatter2.currency(Double.parseDouble(itemList.getRow(i).get("ITEM_PRICE")), 0)%> </td>
- <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
- <td style="text-align:right;"><%=Formatter2.currency(Double.parseDouble(itemList.getRow(i).get("SUM_AMT")), 0)%> </td>
- <%} %>
- </tr>
- <%
- }
- %>
- <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
- <tr>
- <th colspan="4" style="text-align:center"><b>합 계</b></th>
- <td style="text-align:right;"><%=Formatter2.currency(sum_qty, 0)%> </td>
- <td colspan="2" style="text-align:right;"><%=Formatter2.currency(sum_amt, 0)%> </td>
- </tr>
- <%} %>
- </table>
- <%
- }
- %>
- <%}else{%>
- <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid black;padding-top:5px">
- <tr>
- <td align="center" bgcolor="#efefef">
- <table width="770px" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td align="center">
- <%
- for(int i = 0 ; i < template.size(); i ++){
- %>
- <input type="hidden" name="template_seq" value="<%=template.getRow(i).get("SEQ")%>">
- <input type="hidden" name="template_name" value="<%=template.getRow(i).get("TEMPLATE_NAME")%>">
- <input type="hidden" name="template_style" value="<%=template.getRow(i).get("TEMPLATE_STYLE")%>">
- <input type="hidden" name="option_yn" value="<%=template.getRow(i).get("OPTION_YN")%>">
- <% if(i==0){%>
- <span class="tab_on" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
- <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
- <%=template.getRow(i).get("TEMPLATE_NAME")%>
- </span>
- <% }else{ %>
- <%if((template.getRow(i).get("OPTION_YN").equals("A")) ||(template.getRow(i).get("CHECK_YN").equals("Y"))){ //정상적인 계약서 파일만 보이게 한다. 진행중일경우 체크 박스로 추가 가능%>
- <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
- <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
- <%=template.getRow(i).get("TEMPLATE_NAME")%>
- </span>
- <%} %>
- <% } %>
- <%} %>
- </td>
- </tr>
- </table>
- <div id="__html" style="width:770px;border:1px solid black;padding:10px 10px 10px 10px;background-color:#FFFFFF;text-align:left;" >
- <%
- for(int i = 0 ; i < template.size(); i ++){
- String template_html = ClobUtils.getClob((Clob)template.getRow(i).getObject("TEMPLATE_HTML"));
- String divHidden = template.getRow(i).get("SEQ").equals("0")?"":"none";
- %>
- <div style="display:<%=divHidden%>; padding-top: 10px;overflow:hidden;overflow-y:auto;<%=template.getRow(i).get("TEMPLATE_STYLE") %>" id="__html_<%=template.getRow(i).get("SEQ")%>">
- <%= template_html%>
- </div>
- <%} %>
- </div>
- <br />
- </td>
- </tr>
- </table>
- <%} %>
- <div class="application-info magT15">
- <div class="application-sub-title">
- <span class="title">계약서류</span>
- </div>
- </div>
- <TABLE class="form-table">
- <colgroup>
- <col width="120" />
- <col width="*" />
- </colgroup>
- <TR height="25">
- <TH>자동생성</TH>
- <TD>
- <table width="100%">
- <colgroup>
- <col width="100%" />
- </colgroup>
- <TR height="25">
- <TD>
- <div id="auto_attach_file_view" class="attach_file_view">
- <ul>
- <%
- for(int i=0;i<autofile_list.size();i++){
- %>
- <li><a href="/common/file/FileDownloadServlet?mode=fpDown&filePath=/cont/<%=autofile_list.getRow(i).get("FILE_PATH")%>&fileName=<%=URLEncoder.encode(autofile_list.getRow(i).get("FILE_NAME"), "UTF-8") +"."+ autofile_list.getRow(i).get("FILE_EXT")%>&fileRealName=<%=autofile_list.getRow(i).get("UNIQUE_FILE_NAME")%>"><%=i+1%> : <%=autofile_list.getRow(i).get("FILE_NAME")%> (<%=autofile_list.getRow(i).get("FILE_SIZE").trim() %>)</a></li>
- <%
- }
- %>
- </ul>
- </div>
- </TD>
- </TR>
- </TABLE>
- </TD>
- </TR>
- <TR height="25">
- <TH>직접첨부</TH>
- <TD>
- <table width="100%">
- <colgroup>
- <col width="50%" />
- <col width="50%" />
- </colgroup>
- <tr>
- <td>
- <div id="attach_file_view" class="attach_file_view">
- <!-- 첨부 파일 화면에 바로보일때 사용 -->
- <%=FileManager.getFileListForDiv("PUR_CONT_MOD_ID", ContInfo.get("PUR_CONT_MOD_ID")) %>
- </div>
- </td>
- <td>
- <!-- IMG id='search_spot_button' onClick="doAttachFileDiv(document.form1.PUR_CONT_MOD_ID,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;' -->
- </td>
- </tr>
- </table>
- </TD>
- </TR>
- </TABLE>
- <%if(warrList.size()>0){%>
- <%
- /*
- 보증 목록을 include 시킴 (2014-10-16) 김명호
- */
- %>
- <%@ include file="/jsp/ko_KR/buyer/cont/purchase/guarList.jsp" %>
- <%
- }
- %>
- </form>
- <!-- =========사인 요청 상태이후 (20)에는 입력을 받지 못하게 처리 (김명호 : 2014-07-21)============== -->
- <script>
- //window.addEventListener("onload",convertHtml)
- <%
- if((ContInfo.get("STATUS_CD").equals("20")) || (ContInfo.get("STATUS_CD").equals("30")) || (ContInfo.get("STATUS_CD").equals("50"))){
- %>
- //window.onload=convertHtml();
- window.onload = function() {
- convertHtml();
- };
- <%
- }
- %>
- function convertHtml(){
- if(!document.getElementById("__html"))return;
- var elements = document.getElementById("__html").getElementsByTagName("input");
- for(var i = 0; i < elements.length; i++){
- var element = elements[i];
- setDisabled(element);
- }
- var elements = document.getElementById("__html").getElementsByTagName("textarea");
- for(var i = 0; i < elements.length; i++){
- var element = elements[i];
- element.className = "input_readonly";
- element.readOnly = true;
- }
- var elements = document.getElementById("__html").getElementsByTagName("img");
- for(var i = 0; i < elements.length; i++){
- var element = elements[i];
- element.style.display="none";
- }
- /*협력사에서 안보이는 부분숨기는 처리*/
- var elements = getElementsByClass("cl_no_view");
- for(var i = 0; i < elements.length; i++){
- var element = elements[i];
- element.style.display="none";
- }
- }
- </script>
|