1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456 |
- <%--
- - Author(s) : Kim Myung HO
- - Date : 2014.07.07
- - 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="com.udapsoft.waf.common.util.DateUtil"%>
- <%@ 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");
- String RTN_REASON = "";
- boolean rtn = false;
- if(ContInfo.get("RTN_REASON").length() > 0){
- RTN_REASON = ContInfo.get("RTN_REASON");
- rtn = true;
- }
-
- /*계약서식 정보 */
- RowSet template = storage.getRowSet("template");
- /*계약서식 FILE */
- RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");
-
- /*보증 정보 LIst */
- RowSet warrList = storage.getRowSet("warrList");
-
- /*인지세 구분*/
- RowSet stampList = storage.getRowSet("stampRowSet");
-
- //2016.12.9
- String sToday = DateUtil.getSystemDate().substring(0,8);
- String sTarget = DateUtil.getPrePostDate("yyyymmdd", -29 );
- %>
- <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;
- 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();
- }
- }
- //외주내역 팝업 2018.10.18
- jQuery("#btnItem").click(function() {
- var win_id = "ItemPop";
- var edit_yn = "Y";
- if(jQuery("#STATUS_CD").val() != '10') edit_yn = "N" ;
-
- var link = "/cont/outside/ContItemPopup.screen";
- link += "?pop_win_id="+win_id+"&mod_no="+"<%=ContInfo.get("MOD_NO")%>" + "&sub_cont_mod_id="+"<%=ContInfo.get("SUB_CONT_MOD_ID")%>"+"&digit="+"<%=ContInfo.get("SOSUNUM")%>"+"&edit_yn=" + edit_yn;
- fLayerPop(win_id, link, 950,500, '','', 'NO');
- });
-
- jQuery("#btnAdd").click(function() {
- var win_id = "_StampDutyPop";
- var link = "/cont/outside/stampDutyPop.screen";
- link += "?pop_win_id="+win_id
- link += "&p_move=I"
- link += "&p_cont_mod_id="+"<%=ContInfo.get("SUB_CONT_MOD_ID")%>"
- link += "&p_issue_gb="+jQuery("#p_issue_gb").val()
- link += "&p_who=E" ;
-
- fLayerPop(win_id, link, 700,250, '', '', 'NO');
-
- /*2016.12.12 인지세 변경
- var rowIdx = sheet2.DataInsert(-1);
- if(jQuery("#p_issue_gb").val()=="10"){
- sheet2.SetCellValue(rowIdx, "STAMP_DUTY_ISSUE_GB", "10");
- }else{
- sheet2.SetCellValue(rowIdx, "STAMP_DUTY_ISSUE_GB", "20");
- } */
- });
-
- jQuery("#btnPromiseAdd").click(function() {
- var rowIdx = sheet3.DataInsert(-1);
- if(jQuery("#p_promise_gb").val()=="10"){
- sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "10");
- }else{
- sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "20");
- }
- });
-
- function StampDutyClose(result){
- if(result.length > 0){
- $("#O_USER_NAME").val(result[1]);
- $("#O_DIVISION").val(result[3]);
- $("#O_POSITION").val(result[5]);
- $("#O_TEL_NUM").val(result[6]);
- $("#O_HP").val(result[7]);
- $("#O_EMAIL").val(result[8]);
- $("#O_ACCT_ID").val(result[9]);
- }
- fLayerPopClose('_searchUserPopup');
- }
-
- jQuery("#btnSaveStamp").click(function() {
- if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="D"){
- alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
- return;
- }
- }
- }
-
- if (confirm("저장하시겠습니까?")) {
- var f = document.form1;
- jQuery("#fevent").val("STAMP_DUTY_GB_SAVE");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "STAMP_DUTY_GB_SAVE", f);
- }
- });
-
- jQuery("#btnSavePromise").click(function() {
-
- if(jQuery('#p_promise_gb').val() == '00' && sheet3.GetTotalRows() != 0 ){
- for(i=1; i <= sheet3.RowCount(); i++){
- if(sheet3.GetCellValue(i, "STATUS")!="D"){
- alert("서약서를 미발행으로 등록하려면\n서약서가 등록되어있거나 등록해서는 안됩니다.\n서약서를 삭제하여 주십시오.");
- return;
- }
- }
- }
-
- if (confirm("저장하시겠습니까?")) {
- doSavePromise();
- }
-
- });
-
- /**
- * Application Initialize
- */
- jQuery("#ELEC_CON_YN1").click(function() {
- jQuery("#ELEC_CON_YN1").attr("checked",true);
- jQuery("#ELEC_CON_YN2").attr("checked",false);
- });
- jQuery("#ELEC_CON_YN2").click(function() {
- jQuery("#ELEC_CON_YN1").attr("checked",false);
- jQuery("#ELEC_CON_YN2").attr("checked",true);
- });
-
-
- jQuery("#btnSave").click(function() {
-
- if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="D"){
- alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
- return;
- }
- }
- }
-
- if(ck()){
- alert("[전자 계약 여부]는 필수 입니다.");
- return;
- }
- if(!valCheck()){
- return;
- }
-
-
- /*2016.5.11 마이너스 세금계산서 발행하는 것으로
- if(parseFloat_isNaN(jQuery("#con_supply_tamt").val().replace(/,/gi, "")) < parseFloat_isNaN(jQuery("#MIN_CONT_SUPPLY_TAMT").val().replace(/,/gi, ""))){
- alert("공급가액 과세가"+jQuery("#MIN_CONT_SUPPLY_TAMT").val()+ "이 금액보다 크거나 같아야 합니다.");
- return;
- }
-
- if(parseFloat_isNaN(jQuery("#con_supply_namt").val().replace(/,/gi, "")) < parseFloat_isNaN(jQuery("#MIN_CONT_SUPPLY_NAMT").val().replace(/,/gi, ""))){
- alert("공급가액 면세가"+jQuery("#MIN_CONT_SUPPLY_NAMT").val()+ "이 금액보다 크거나 같아야 합니다.");
- return;
- }*/
- if(!chkContHtml()){
- return;
- }
- if (confirm("저장 하시겠습니까?")){
- var f = document.form1;
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "PARTNER_EMP_CHK", f, "VALUEOBJECT");
- document.form1.isSubmit = false;
-
- /* var f = document.form1;
- jQuery("#fevent").val("FORM_SAVE");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f); */
- }
- });
-
-
- jQuery("#btnMove").click(function() {
- if (confirm("계약대상이동 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("FORM_MOVE");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_MOVE", f);
- }
- });
-
- jQuery("#btnSignCall").click(function() {
- if(jQuery("#ELEC_CON_YN2").attr("checked") == "checked"){
- alert("오프라인 계약이라서 서명 요청을 할 수 없습니다.");
- return;
- }else{
- /* if(!stampDutyRowCheck()){
- return;
- }
- if(!stampDutyCheck()){
- return;
- } */
- if (confirm("업체에 서명 요청 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("SIGN_CALL");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_CALL", f);
- }
- }
- });
- jQuery("#btnReSignCall").click(function() {
- if (confirm("서명을 취소하게 되면 업체에서 다시 서명을 진행 해야 합니다.\n\n서명을 취소 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("SIGN_CALL");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_CALL", f);
- }
- });
-
- jQuery("#btnSignOk").click(function() {
-
- var stampMsg = '';
-
- //2016.12.8 날짜확인 추가. 계약일로부터 29일 경과한 경우, 계약기간이 만료된 경우.
- var sCondate = "<%=ContInfo.get("CON_DATE").replaceAll("-","").substring(0,8) %>";
- var sEnddate = "<%=ContInfo.get("END_WORK_DATE").replaceAll("-","").substring(0,8)%>";
-
- if ("<%=ContInfo.get("MOD_NO")%>" == "0"){
- if ( sCondate < "<%= sTarget%>" || sEnddate < "<%= sToday%>" ) {
- stampMsg = "해당 계약은 계약일로부터 30일 경과 또는 계약기간이 만료된 계약으로 고용/산재보험 하수급인사업주 승인신청 및 하도급대금지급보증서 발급이 불가합니다.\n\n ";
- stampMsg = stampMsg + "계속 진행하시겠습니까?";
- if (!confirm(stampMsg)){
- return ;
- }
- }
- }
-
- stampMsg = '서명 하시겠습니까?';
-
- if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
- alert("인지세 발급 구분이 미발행일시 등록 된 인지세가 없어야 합니다. 삭제하여 주십시오.");
- return;
- }else{
-
- if(!stampDutyRowCheck()){
- return;
- }
- if(!stampDutyCheck()){
- return;
- }
- if(!promiseRowCheck()){
- return;
- }
- if(!promiseCheck()){
- return;
- }
-
- var chgCont = jQuery("#ChgCont").val();
- if(chgCont != "Y"){
-
- if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() == 0 ){
- alert("등록 된 인지세가 없습니다.");
- return;
- }else if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() != 0 ){
- var ordAmt = parseInt(jQuery('#con_amt').val().replace(/,/gi,""));
- var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
-
- if( ordAmt <= 10000000 ){
- if( stampDutyTax != 0 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 이하 : 0원\n\n서명 하시겠습니까?';
- }
- }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
- if( stampDutyTax != 20000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 초과 ~ 3천만원이하 : 2만원\n\n서명 하시겠습니까?';
- }
- }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
- if( stampDutyTax != 40000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n3천만원 초과 ~ 5천만원이하 : 4만원\n\n서명 하시겠습니까?';
- }
- }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
- if( stampDutyTax != 70000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n5천만원 초과 ~ 1억원이하 : 7만원\n\n서명 하시겠습니까?';
- }
- }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
- if( stampDutyTax != 150000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1억원 초과 ~ 10억원이하 : 15만원\n\n서명 하시겠습니까?';
- }
- }else if( ordAmt > 1000000000 ) {
- if( stampDutyTax != 350000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n10억원 초과 : 35만원\n\n서명 하시겠습니까?';
- }
- }
- }
- }else{
- var befOrdAmt = parseFloat_isNaN(jQuery("#o_con_amt").val().replace(/,/gi,""));
- var ordAmt = parseFloat_isNaN(jQuery('#con_amt').val().replace(/,/gi,""));
- var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
- var befDutyTax = 0 ;
- var dutyTax = 0;
- var remainTax = 0;
- if( befOrdAmt <= 10000000 ){
- befDutyTax = 0;
- }else if( befOrdAmt > 10000000 && befOrdAmt <= 30000000 ) {
- befDutyTax = 20000;
- }else if( befOrdAmt > 30000000 && befOrdAmt <= 50000000 ) {
- befDutyTax = 40000;
- }else if( befOrdAmt > 50000000 && befOrdAmt <= 100000000 ) {
- befDutyTax = 70000;
- }else if( befOrdAmt > 100000000 && befOrdAmt <= 1000000000 ) {
- befDutyTax = 150000;
- }else if( befOrdAmt > 1000000000 ) {
- befDutyTax = 350000;
- }
- if( ordAmt <= 10000000 ){
- dutyTax = 0;
- }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
- dutyTax = 20000;
- }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
- dutyTax = 40000;
- }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
- dutyTax = 70000;
- }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
- dutyTax = 150000;
- }else if( ordAmt > 1000000000 ) {
- dutyTax = 350000;
- }
- remainTax = dutyTax - befDutyTax;
-
- if(remainTax > 0){
- if( remainTax != stampDutyTax ){
- stampMsg = '변경계약금액에 따른 인지세가 틀립니다.\n\n'+num2han2(remainTax)+'원\n\n서명 하시겠습니까?';
- }
- }
- }
- }
- if (confirm(stampMsg)){
- var f = document.form1;
- jQuery("#fevent").val("SIGN_OK");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_OK", f);
- }
- });
-
- jQuery("#btnComplete").click(function() {
-
- var stampMsg = '계약을 완료 하시겠습니까?';
-
- if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
- alert("인지세 발급 구분이 미발행일시 등록 된 인지세가 없어야 합니다. 삭제하여 주십시오.");
- return;
- }else{
-
- if($("#ELEC_CON_YN1").attr("checked") == "checked"){
- alert("전자계약 완료 처리는 오프라인 전자계약에 대해서만 처리가 가능합니다.");
- return false;
- }
- if(!stampDutyRowCheck()){
- return;
- }
- if(!stampDutyCheck()){
- return;
- }
- if(!promiseRowCheck()){
- return;
- }
- if(!promiseCheck()){
- return;
- }
-
- var chgCont = jQuery("#ChgCont").val();
- if(chgCont != "Y"){
-
- if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() == 0 ){
- alert("등록 된 인지세가 없습니다.");
- return;
- }else if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() != 0 ){
- var ordAmt = parseInt(jQuery('#con_amt').val().replace(/,/gi,""));
- var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
-
- if( ordAmt <= 10000000 ){
- if( stampDutyTax != 0 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 이하 : 0원\n\n계약을 완료 하시겠습니까?';
- }
- }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
- if( stampDutyTax != 20000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 초과 ~ 3천만원이하 : 2만원\n\n계약을 완료 하시겠습니까?';
- }
- }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
- if( stampDutyTax != 40000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n3천만원 초과 ~ 5천만원이하 : 4만원\n\n계약을 완료 하시겠습니까?';
- }
- }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
- if( stampDutyTax != 70000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n5천만원 초과 ~ 1억원이하 : 7만원\n\n계약을 완료 하시겠습니까?';
- }
- }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
- if( stampDutyTax != 150000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1억원 초과 ~ 10억원이하 : 15만원\n\n계약을 완료 하시겠습니까?';
- }
- }else if( ordAmt > 1000000000 ) {
- if( stampDutyTax != 350000 ) {
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n10억원 초과 : 35만원\n\n계약을 완료 하시겠습니까?';
- }
- }
- }
- }else{
- var befOrdAmt = parseFloat_isNaN(jQuery("#o_con_amt").val().replace(/,/gi,""));
- var ordAmt = parseFloat_isNaN(jQuery('#con_amt').val().replace(/,/gi,""));
- var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
- var befDutyTax = 0 ;
- var dutyTax = 0;
- var remainTax = 0;
- if( befOrdAmt <= 10000000 ){
- befDutyTax = 0;
- }else if( befOrdAmt > 10000000 && befOrdAmt <= 30000000 ) {
- befDutyTax = 20000;
- }else if( befOrdAmt > 30000000 && befOrdAmt <= 50000000 ) {
- befDutyTax = 40000;
- }else if( befOrdAmt > 50000000 && befOrdAmt <= 100000000 ) {
- befDutyTax = 70000;
- }else if( befOrdAmt > 100000000 && befOrdAmt <= 1000000000 ) {
- befDutyTax = 150000;
- }else if( befOrdAmt > 1000000000 ) {
- befDutyTax = 350000;
- }
- if( ordAmt <= 10000000 ){
- dutyTax = 0;
- }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
- dutyTax = 20000;
- }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
- dutyTax = 40000;
- }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
- dutyTax = 70000;
- }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
- dutyTax = 150000;
- }else if( ordAmt > 1000000000 ) {
- dutyTax = 350000;
- }
- remainTax = dutyTax - befDutyTax;
-
- if(remainTax > 0){
- if( remainTax != stampDutyTax ){
- stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n'+num2han2(remainTax)+'원\n\n계약을 완료 하시겠습니까?';
- }
- }
- }
- }
-
- if (confirm(stampMsg)){
- var f = document.form1;
- jQuery("#fevent").val("END_CONT");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "END_CONT", f);
- }
- });
- jQuery("#btnWriteEnd").click(function() {
- /* if(!stampDutyRowCheck()){
- return;
- }
- if(!stampDutyCheck()){
- return;
- } */
- //2015.11.23 확정될때까지 보류.
- //과세,면세 금액 둘다 있는 경우 ->기존과 동일
- //과세금액만 있는 경우 - 안분계산서, 불공제만 선택가능
- /*if ( parseFloat_isNaN(jQuery("#con_supply_namt").val().replace(/,/gi, "")) == 0 ) {
- var v_proof = jQuery("#proof_cd").val();
- if (v_proof != '206' && v_proof != '210' ){
- alert('과세금액만 있는경우 증빙종류는 안분계산서, 불공제만 가능합니다.');
- return ;
- }
- }*/
-
- if (confirm("작성중인 계약서를 완료처리 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("WRITE_END");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "WRITE_END", f);
- }
- });
- jQuery("#btnReject").click(function() {
- if (confirm("작성중인 계약서를 반려 요청 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("CONT_REJECT");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "CONT_REJECT", f);
- }
- });
-
- jQuery("#btnPayGuarComp").click(function() {
- var mod_gb = "<%=ContInfo.get("MOD_GB")%>";
- var warr_status = "<%=ContInfo.get("WARR_STATUS")%>";
- if (confirm("하도급대금지급보증서 확인 요청 하시겠습니까?")){
- if(mod_gb == "02" || mod_gb == "20" || mod_gb == "22"){
- alert("해당 계약서는 하도급대금지급보증서 대상이 아닙니다. \n보증완료 상태로 변경합니다.");
- }else{
- if(warr_status == "00"){
- if(confirm("해당 계약서는 하도급대금지급보증서 미발급 상태입니다.\n계속 진행하시겠습니까?")){
-
- }else{
- return;
- }
- }
- }
-
- var f = document.form1;
- jQuery("#fevent").val("CONT_PAY_GUAR");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "CONT_PAY_GUAR", f);
- }
- });
-
- //계약 작성완료 상태에서 반려로 대체
- /*
- jQuery("#btnReject").click(function() {
- if (confirm("보증 정보에 대해서 반려 요청 하시겠습니까?")){
- var win_id = "editcall_pop";
- var link = "/cont/outside/RejectReasonPopup.screen";
- link += "?pop_win_id="+win_id+"&SUB_CONT_MOD_ID="+$("#SUB_CONT_MOD_ID").val();
- fLayerPop(win_id, link, 600,180, '','', 'NO');
- }
- });
- */
- //시행 결의
- jQuery("#btnResolve").click(function() {
-
- if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="D"){
- alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
- return;
- }
- }
- }
-
- if (confirm("변경 계약에 대해서 결재 요청 하시겠습니까?")){
- document.form1.isSubmit = false;
- var f = document.form1;
- var sign_cont_mod_id = $("#SUB_CONT_MOD_ID").val();
- dlgSignForm('ebid_ocpoD', '/cont/outside/contSign.screen?sign_cont_mod_id='+sign_cont_mod_id+'^acct_id='+"<%=user.get("ACCT_ID")%>");
- }
- });
- jQuery("#btnSavePayItem").click(function() {
- if (confirm("분개유형을 저장 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("SAVE_PAYITEM");
- submitXmlRequest("/cont/outside/ContResult_form.screen", "SAVE_PAYITEM", f);
- }
- });
- //변경계약 삭제
- jQuery("#btnDel").click(function() {
- if (confirm("변경계약을 삭제 하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("FORM_DEL");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_DEL", f);
- }
- });
-
- }
- function stampDutyCheck(){
-
- for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="D"){
- if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
- alert("인지세 "+i+"행의 고유식별번호가 없습니다.");
- return false;
- }
- if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
- alert("인지세 "+i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
- return false;
- }
- if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
- alert("인지세 "+i+"행의 발행일자가 없습니다.");
- return false;
- }
- if(sheet2.GetCellValue(i, "FILE_ID")==""){
- alert("인지세 "+i+"행의 인지세사본이 없습니다.");
- return false;
- }
- }
- }
- return true;
- }
-
- function promiseCheck(){
-
- for(i=1; i <= sheet3.RowCount(); i++){
- if(sheet3.GetCellValue(i, "STATUS")!="D"){
- if(sheet3.GetCellValue(i, "FILE_ID")==""){
- alert("서약서 "+i+"행의 서약서 사본이 없습니다.");
- return false;
- }
- }
- }
- return true;
- }
-
- function ck(){
- if($("#ELEC_CON_YN1").attr("checked") == "checked"){
- return false;
- }
- if($("#ELEC_CON_YN2").attr("checked") == "checked"){
- return false;
- }
- return true;
- }
- function valCheck(){
- if(jQuery("#mod_gb").val() == ""){
- alert("변경내역을 선택해 주세요");
- return false;
- }
- //변경계약일경우 체크 프로세스 태운다. 2014-11-14 김명호 추가
- if(jQuery("#mod_gb").val() != "00"){
- if(!changeValCheck()){
- return;
- }
- }
-
- /* for(i=1; i <= sheet2.RowCount(); i++){
- if(sheet2.GetCellValue(i, "STATUS")!="D"){
- if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
- alert(i+"행의 고유식별번호가 없습니다.");
- return false;
- }
- if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
- alert(i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
- return false;
- }
- if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
- alert(i+"행의 발행일자가 없습니다.");
- return false;
- }
- if(jQuery("#STATUS_CD").val() == '40'){
- if(sheet2.GetCellValue(i, "FILE_ID")==""){
- alert(i+"행의 인지세사본이 없습니다.");
- return false;
- }
- }
- }
- } */
-
- if(!checkTelno(jQuery("#O_TEL_NUM").val())) {
- alert("전화번호가 올바르지 않은 형식입니다");
- jQuery("#O_TEL_NUM").focus();
- return false;
- }
- if(!checkTelno(jQuery("#O_HP").val())) {
- alert("휴대폰번호가 올바르지 않은 형식입니다");
- jQuery("#O_HP").focus();
- return false;
- }
- if(!checkTelno(jQuery("#C_TEL_NUM").val())) {
- alert("전화번호가 올바르지 않은 형식입니다");
- jQuery("#C_TEL_NUM").focus();
- return false;
- }
- if(!checkTelno(jQuery("#C_HP").val())) {
- alert("휴대폰번호가 올바르지 않은 형식입니다");
- jQuery("#C_HP").focus();
- return false;
- }
- if(!checkEmail(jQuery("#O_EMAIL").val())){
- alert("이메일 형식이 올바르지 않습니다.");
- jQuery("#O_EMAIL").focus();
- return false;
- }
- if(!checkEmail(jQuery("#C_EMAIL").val())){
- alert("이메일 형식이 올바르지 않습니다.");
- jQuery("#C_EMAIL").focus();
- return false;
- }
- return true;
- }
- //자동로그인 기능
- 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/outside/ContIngList.screen";
- f.target = "_self";
- f.submit();
- }
- function doResult(resultObj) {
- try {
- if( resultObj.getRequestEvent() == "PARTNER_EMP_CHK") {
- if( resultObj.getSuccess() ) {
- var vo = resultObj.getValueObject();
- var cnt = vo.get("EMP_CHK_CNT");
- if(cnt > 0){
- var f = document.form1;
- jQuery("#fevent").val("FORM_SAVE");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f);
- }else{
- if(confirm("등록된 업체담당자 정보와 일치하지 않습니다. 계속진행하시겠습니까?")){
- var f = document.form1;
- jQuery("#fevent").val("FORM_SAVE");
- submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f);
- }else{
- return;
- }
- }
- }else {
- dlgErrorMsg(resultObj);
- }
- document.form1.isSubmit = false;
- }
- if( resultObj.getRequestEvent() == "FORM_SAVE") {
- if( resultObj.getSuccess() ) {
- jQuery("#save_gb").val("Y");
- doSaveStamp();
- doSavePromise();
-
- alert("저장 되었습니다.");
- window.location.reload();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "STAMP_DUTY_GB_SAVE") {
- if( resultObj.getSuccess() ) {
- doSaveStamp();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "SIGN_CALL") {
- if( resultObj.getSuccess() ) {
- alert("서명 요청이 정상적으로 처리 되었습니다.")
- window.location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "WRITE_END") {
- if( resultObj.getSuccess() ) {
- alert("작성 완료 상태로 처리 되었습니다.")
- window.location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "CONT_REJECT") {
- if( resultObj.getSuccess() ) {
- alert("계약서에 대해서 반려 처리 되었습니다.\n\n최초 작성자가 다시 수정 할수 있는 상태입니다.")
- window.location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "SIGN_OK") {
- if( resultObj.getSuccess() ) {
- alert("서명 정상적으로 처리 되었습니다.")
- window.location.href="/cont/outside/ContResultList.screen";
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "END_CONT") {
- if( resultObj.getSuccess() ) {
- alert("정상적으로 처리 되었습니다.")
- window.location.href="/cont/outside/ContResultList.screen";
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "SAVE_PAYITEM") {
- if( resultObj.getSuccess() ) {
- alert("정상적으로 처리 되었습니다.")
- window.location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- //계약서 삭제
- if( resultObj.getRequestEvent() == "FORM_DEL") {
- if( resultObj.getSuccess() ) {
- alert("정상적으로 삭제 처리 되었습니다.")
- goListProc();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "FORM_MOVE") {
- if( resultObj.getSuccess() ) {
- alert("정상적으로 처리 되었습니다.")
- window.location.href="/cont/outside/ContIngList.screen";
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- if( resultObj.getRequestEvent() == "CONT_PAY_GUAR") {
- if( resultObj.getSuccess() ) {
- alert("정상적으로 처리 되었습니다.")
- window.location.reload();
- } else {
- dlgErrorMsg(resultObj);
- }
- }
- document.form1.isSubmit = false;
- }
- catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
-
- /*담당자 호출*/
- function SearchUser(NAME,CODE){
- var win_id = "_searchUserPopup";
- var link = "/lib/dlgSearchUserPop.screen";
- link += "?pop_win_id="+win_id;
- link += "&deptNameYn=outside";
- link += "&NAME=" + NAME;
- link += "&CODE=" + CODE;
- fLayerPop(win_id, link, 700,400, '', '', 'NO');
- }
- /*담당자 호출 Return Value 처리*/
- function SearchUserClose(result){
- if(result.length > 0){
- $("#O_USER_NAME").val(result[1]);
- $("#O_DIVISION").val(result[3]);
- $("#O_POSITION").val(result[5]);
- $("#O_TEL_NUM").val(result[6]);
- $("#O_HP").val(result[7]);
- $("#O_EMAIL").val(result[8]);
- $("#O_ACCT_ID").val(result[9]);
- }
- fLayerPopClose('_searchUserPopup');
- }
-
- var text = 'a\nb';
- /*계약서 pdf script start*/
- function chkContHtml(){
- var f = document.form1;
- var c = $("#PDF_FILE_CNT").val();
- if(validate(f)){
- splitHtml(f, 'cont_html', false, c);
- splitHtml(f, 'cont_html_rm', true, c);
-
- //공사기간에 대해서 준공일이 착공일 보다 빠르면 안됨 처리
- if(f.start_work_date_year.value+f.start_work_date_month.value+f.start_work_date_day.value > f.end_work_date_year.value+f.end_work_date_month.value+f.end_work_date_day.value){
- alert("공사 기간에 준공일이 착공일 보다 빠르게 셋팅 되었습니다.\n\n준공일을 다시 설정해 주시기 바랍니다.");
- return false;
- }
- //기성금에 대해서 현금 + 어음 은 100% 체크
- if(parseInt(f.pay_way_cash.value)+parseInt(f.pay_way_bill.value) != 100){
- alert("지급 방법에 현금과 어음의 합은 100%로 설정해 주시기 바랍니다.");
- f.pay_way_cash.focus();
- return false;
- }
-
- return true;
- }
- return false;
- }
- /*계약서 pdf script end*/
-
- function output(msg) {
- $('<li>').text(msg).appendTo($('#output'));
- }
-
- function replace(str) {
- return str.replace('\r', 'CR').replace('\n', 'LF');
- }
- //반려요청 팝업 종료후 액션
- function EditCallReasonClose(returnValue){
- if(returnValue == null)
- fLayerPopClose('editcall_pop');
-
- if(returnValue[0] == 0){
- fLayerPopClose('editcall_pop');
- goListProc();
- }
- }
- //첨부파일
- function doAttachFileDiv(obj) {
- if(obj==''){
- alert("저장을 한 후 파일을 첨부할 수 있습니다.");
- }
- else if(obj != ''){
- var edtYN ="N";
- //2015.3.25 반려일때 첨부추가 가능. (10작성중, 41반려)
- if((document.getElementById("STATUS_CD").value=="10") || (document.getElementById("STATUS_CD").value=="41")){edtYN="Y";}
- viewFileListNew('SUB_CONT_MOD_ID', obj.value, document.getElementById("attach_file_view"), edtYN, "cont/outside/<%=ContInfo.get("SUB_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="Y";}else{editFile="Y";}
- viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contOutWarrPopup");
- }
- }
- //결재
- function dlgSignForm( sign_class_cd, uri ) {
- var f = document.form1;
- var sheet1 = document.all.sheet1;
- var url = "/contOutsideSign/contSign_form.screen";
- url += "?sign_class_cd=" + sign_class_cd;
- url += "&uri=" + uri;
- url += "&sign_cont_mod_id=" + $("#SUB_CONT_MOD_ID").val();
- url += "&acct_type=1";
- window.open(url, "_blank","width=200,height=100,SCROLLBARS=no");
- }
-
- //보증정보팝업 호출
- function popContWarr(wG, wSeq, wCauseCd) {
-
- var win_id = "contOutWarrPopup";
- var param = "";
- var param = "?subContModId=" + jQuery("#SUB_CONT_MOD_ID").val();
- var param = param + "&warrGubun=" + wG;
- var param = param + "&warrSeq=" + wSeq;
- var param = param + "&causeCode=" + wCauseCd;
- var param = param + "&wonWarr=" + jQuery("#WON_WARR").val();
- var param = param + "&viewDiv=CONT";
- var param = param + "&pop_win_id=" + win_id;
- var param = param + "&sModule=EB";
-
- var url = "/portal/guar/contOutWarrPopup.screen"+param;
-
- fLayerPop(win_id, url, 560,350, '','', 'YES');
- }
- //보증정보팝업 종료후 액션
- function popContWarrClose(returnValue){
- if(returnValue == null)
- fLayerPopClose('contOutWarrPopup');
-
- if(returnValue[0] == 0){
- fLayerPopClose('contOutWarrPopup');
- location.reload();
- }
- }
-
- function corpPopup(corpID){
- var url = "/cont/outside/ContTargetPopup.screen";
- url += "?p_corp_id=" + corpID;
- url += "&sModule="+"LM";
-
- window.open(url, "_ContTargetPop","width=1000,height=650,SCROLLBARS=no");
- }
-
- function erpCheckYn(){
- alert("계약완료 후 변경 불가능합니다.");
- }
- </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="save_gb" id="save_gb" value="">
- <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="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
- <INPUT type="hidden" name="SUB_CONT_MOD_ID" value="<%=ContInfo.get("SUB_CONT_MOD_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="C_VENDCD" value="<%=ContInfo.get("C_VENDCD")%>">
- <INPUT type="hidden" name="O_ACCT_ID" id="O_ACCT_ID" value="<%=ContInfo.get("CON_CHARGE_ID")%>">
- <!-- 계약서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="O_REG_NO" value="<%=ContInfo.get("O_REG_NO") %>">
- <INPUT type="hidden" name="WON_WARR" value="<%=params.get("WON_WARR") %>">
- <INPUT type="hidden" name="MIN_CONT_SUPPLY_TAMT" value="<%=Formatter2.currency(ContInfo.get("MIN_CONT_SUPPLY_TAMT"), ContInfo.getInt("SOSUNUM"))%>">
- <INPUT type="hidden" name="MIN_CONT_SUPPLY_NAMT" value="<%=Formatter2.currency(ContInfo.get("MIN_CONT_SUPPLY_NAMT"), ContInfo.getInt("SOSUNUM")) %>">
- <INPUT type="hidden" name="ChgCont" value="<%=params.get("ChgCont") %>">
- <!-- 제목 및 버튼 -->
- <table width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div align="left" id="title">
- <ul>
- <li>외주_계약 현황 상세 <font style="font-size:11px">(<%=ContInfo.get("STATUS_NM")%>)</font></li>
- </ul>
- </div>
- </th>
- <td align="right">
- <%
- if(ContInfo.get("STATUS_CD").equals("10")){
- %>
- <span class="btnSearch center" id="btnMove"><a href="javascript:void(0);">계약대상이동</a></span>
- <%
- if(ContInfo.get("MOD_NO").equals("0")){
- %>
- <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
- <span class="btnSearch center" id="btnWriteEnd"><a href="javascript:void(0);">작성완료</a></span>
- <%
- }else{ //변경계약일경우 상태값에 따라 버튼 변화
- %>
- <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
- <!-- <span class="btnSearch center" id="btnResolve"><a href="javascript:void(0);">결재요청</a></span> -->
- <span class="btnSearch center" id="btnWriteEnd"><a href="javascript:void(0);">작성완료</a></span>
- <span class="btnSearch center" id="btnDel"><a href="javascript:void(0);">변경계약서삭제</a></span>
- <%
- }
- }else if(ContInfo.get("STATUS_CD").equals("16")){ //작성완료(16)
- //승인자만 보이게 처리
- if( storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID")) /* || storage.getRequest().getServerName().equals("localhost") */ ){
- if(ContInfo.get("MOD_GB").equals("02") || ContInfo.get("MOD_GB").equals("20") || ContInfo.get("MOD_GB").equals("22")){ //감액,단축,감액단축 계약시
- %>
- <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
- <% }else{%>
- <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
- <% }
- if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
- %>
- <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
- <%
- }
- }else{%>
- <% if(ContInfo.get("MOD_GB").equals("02") || ContInfo.get("MOD_GB").equals("20") || ContInfo.get("MOD_GB").equals("22")){ //감액,단축,감액단축 계약시%>
- <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
- <% }else{%>
- <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
- <% }
- }
- }else if(ContInfo.get("STATUS_CD").equals("19")){ //보증완료(19)
- //승인자만 보이게 처리
- if(storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID")) /* || storage.getRequest().getServerName().equals("localhost") */){
- %>
- <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
- <%
- if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
- %>
- <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
- <%
- }
- }else{%>
- <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
- <%
- }
- }else if(ContInfo.get("STATUS_CD").equals("18")){
- //승인자만 보이게 처리
- if(storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID"))){
- %>
- <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
- <%
- if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
- %>
- <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
- <%
- }
- }
- }else if(ContInfo.get("STATUS_CD").equals("30")){
- %>
- <span class="btnSearch center" id="btnSignOk"><a href="javascript:void(0);">서명</a></span>
- <span class="btnSearch center" id="btnReSignCall"><a href="javascript:void(0);">서명취소</a></span>
- <%
- }else if((ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){
- %>
- <span class="btnSearch center" id="btnSave"><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>
- </td>
- </tr>
- </table>
- <%
- /*
- 계약 정보를 한페이지로 만들어서 include 시킴 (2014-08-14) 김명호
- */
- String isViewWrite;
- String finalYn = "";
-
- if ((ContInfo.get("STATUS_CD").equals("10")) || (ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){
- isViewWrite = "W";
- }else{
- isViewWrite = "V";
- }
- %>
- <%@ include file="/jsp/ko_KR/buyer/cont/outside/ContInfo.jsp" %>
- <%if ((!ContInfo.get("MODI_REQ_REASON").equals("")) && (ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){ //수정 요청 내용이 있을경우 %>
- <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><%=ContInfo.get("MODI_REQ_REASON") %></TD>
- </TR>
- <TR height="25">
- <TH>요청일</TH>
- <TD><%=ContInfo.get("MODI_REQ_DT") %></TD>
- </TR>
- </TABLE>
- <% } %>
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">계약정보</span>
- </div>
- <div style="text-align:center;">
- <%if ((params.get("ChgCont").equals("Y")) && ContInfo.get("STATUS_CD").equals("10")) { //변경 계약서 일경우 추가 내역%>
- 변경구문
- <select name="mod_gb" onchange="chgModGb(this.value)">
- <option value="">-선택-</option>
- <option value="01" <%=ContInfo.get("MOD_GB").equals("01") ? "selected=selected":""%>>증액</option>
- <option value="02" <%=ContInfo.get("MOD_GB").equals("02") ? "selected=selected":""%>>감액</option>
- <option value="10" <%=ContInfo.get("MOD_GB").equals("10") ? "selected=selected":""%>>연장</option>
- <option value="11" <%=ContInfo.get("MOD_GB").equals("11") ? "selected=selected":""%>>연장증액</option>
- <option value="12" <%=ContInfo.get("MOD_GB").equals("12") ? "selected=selected":""%>>연장감액</option>
- <option value="20" <%=ContInfo.get("MOD_GB").equals("20") ? "selected=selected":""%>>단축</option>
- <option value="21" <%=ContInfo.get("MOD_GB").equals("21") ? "selected=selected":""%>>단축증액</option>
- <option value="22" <%=ContInfo.get("MOD_GB").equals("22") ? "selected=selected":""%>>단축감액</option>
- <option value="98" <%=ContInfo.get("MOD_GB").equals("98") ? "selected=selected":""%>>계약이관</option>
- <option value="99" <%=ContInfo.get("MOD_GB").equals("99") ? "selected=selected":""%>>기타</option>
- </select>
- <% } else { //당초 일경우 기본 값%>
- <input type="hidden" name="mod_gb" id ="mod_gb" value="<%=ContInfo.get("MOD_GB")%>" />
- <% }%>
- <font color="ffffff">......</font>
- ※<span style="background-color:yellow;text-align:center">노랑색</span>은 필수입력사항, <span style="text-align:center;background-color:#CCFF99;">연두색</span>은 계약서에 인쇄되지 않는 항목입니다.
- </div>
- </div>
- <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")){%>
- <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
- <%=template.getRow(i).get("TEMPLATE_NAME")%>
- <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
- </span>
- <%}else if((template.getRow(i).get("OPTION_YN").equals("Y"))){ %>
- <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
- <input type="checkbox" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="Y" <%if(template.getRow(i).get("CHECK_YN").equals("Y")){%>checked="checked"<%}%>>
- <%=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>
- </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("SUB_CONT_MOD_ID", ContInfo.get("SUB_CONT_MOD_ID")) %>
- </div>
- </td>
- <td>
- <IMG id='search_spot_button' onClick="doAttachFileDiv(document.form1.SUB_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>
- <%
- /*
- 보증 목록을 include 시킴 (2014-10-16) 김명호
- */
- if((ContInfo.get("STATUS_CD").equals("20")) || (ContInfo.get("STATUS_CD").equals("30")) || (ContInfo.get("STATUS_CD").equals("50")) || (ContInfo.get("ELEC_CON_YN").equals("N"))){
- if(warrList.size() > 0){
- %>
- <%@ include file="/jsp/ko_KR/buyer/cont/outside/guarList.jsp" %>
- <%
- }
- }
- %>
- </form>
- <script type="text/javascript">
- <!--
- /**
- * 상세 코드 검색
- */
- function popSearchCodeDetail(bcd)
- {
- var win_id = "_searchCodePopup";
- var link = "/sycs/code/dlgCodePopup.screen";
- link += "?pop_win_id="+win_id;
- link += "&p_basecd="+bcd;
- fLayerPop(win_id, link, 600,400, '', '', 'NO');
- }
- function SearchCodeDetailClose(result){
- if(result != null){
- if(result[2]=="SUB_ACMP_PAY_TYPE"){
- replaceInput(result[0],"pay_cond_gb" ,__html);
- replaceInput(result[1],"spn_pay_cond_gb" ,__html);
- }
- }
- fLayerPopClose('_searchCodePopup');
- }
- //-->
- </script>
- <!-- =========사인 요청 상태이후 (20)에는 입력을 받지 못하게 처리 (김명호 : 2014-07-21)============== -->
- <script>
- //window.addEventListener("onload",convertHtml)
- <%
- if((ContInfo.get("STATUS_CD").equals("15")) || (ContInfo.get("STATUS_CD").equals("16")) || (ContInfo.get("STATUS_CD").equals("18")) || (ContInfo.get("STATUS_CD").equals("20")) || (ContInfo.get("STATUS_CD").equals("30")) || (ContInfo.get("STATUS_CD").equals("50"))){
- %>
- 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>
|