ContDetail.jsp 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456
  1. <%--
  2. - Author(s) : Kim Myung HO
  3. - Date : 2014.07.07
  4. - Description: 계약 작성
  5. --%>
  6. <%@page import="java.sql.Clob"%>
  7. <%@ page contentType="text/html; charset=utf-8" %>
  8. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  9. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  10. <%@ page import="com.udapsoft.waf.common.util.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="com.udapsoft.waf.common.util.DateUtil"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import="kr.co.hsnc.common.config.WAFConfig" %>
  15. <%@ include file="/jsp/work/taglib.jsp" %>
  16. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  17. <%@page import="java.net.URLEncoder"%>
  18. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  19. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  20. <%
  21. ctx.init(request, response);
  22. HandlerStorage storage = ctx.getHandlerStorage();
  23. ValueObject params = storage.getParams();
  24. ValueObject user = storage.getUser();
  25. // RowSet CorpRowSet = storage.getRowSet("CorpRowSet");
  26. ValueObject ContInfo = storage.getValueObject("ContInfo");
  27. String RTN_REASON = "";
  28. boolean rtn = false;
  29. if(ContInfo.get("RTN_REASON").length() > 0){
  30. RTN_REASON = ContInfo.get("RTN_REASON");
  31. rtn = true;
  32. }
  33. /*계약서식 정보 */
  34. RowSet template = storage.getRowSet("template");
  35. /*계약서식 FILE */
  36. RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");
  37. /*보증 정보 LIst */
  38. RowSet warrList = storage.getRowSet("warrList");
  39. /*인지세 구분*/
  40. RowSet stampList = storage.getRowSet("stampRowSet");
  41. //2016.12.9
  42. String sToday = DateUtil.getSystemDate().substring(0,8);
  43. String sTarget = DateUtil.getPrePostDate("yyyymmdd", -29 );
  44. %>
  45. <LINK href="/css/cont/cont_style.css" rel="stylesheet" type="text/css">
  46. <script language="javascript" src="/js/cont/cont_util.js"></script>
  47. <script language="javascript" src="/js/cont/lib.validate.js"></script>
  48. <SCRIPT language="JavaScript">
  49. /*예약함수*/
  50. var sheet1;
  51. var sheet1Row;
  52. var sheet1PageNo = 1;
  53. var pageLastRowIndex = 1;
  54. var validationResult = false;
  55. var filterShow = false;
  56. function _onReady(){
  57. /* STAMP_DUTY, PROMISE_DOC 인클루드 페이지 기능 */
  58. gridInit2(sheet2);
  59. gridInit3(sheet3);
  60. doSearchStamp();
  61. doSearchPromise();
  62. if(!(jQuery("#STATUS_CD").val() == '20' || jQuery("#STATUS_CD").val() == '30' || jQuery("#STATUS_CD").val() == '50')){
  63. jQuery("#p_issue_gb").attr("disabled",false);
  64. jQuery("#p_promise_gb").attr("disabled",false);
  65. if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""){
  66. jQuery("#btnAdd").hide();
  67. //jQuery("#btnSaveStamp").hide();
  68. }else{
  69. jQuery("#btnAdd").show();
  70. //jQuery("#btnSaveStamp").show();
  71. }
  72. if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""){
  73. jQuery("#btnPromiseAdd").hide();
  74. //jQuery("#btnSavePromise").hide();
  75. }else{
  76. jQuery("#btnPromiseAdd").show();
  77. //jQuery("#btnSavePromise").show();
  78. }
  79. }else{
  80. jQuery("#p_issue_gb").attr("disabled",true);
  81. jQuery("#p_promise_gb").attr("disabled",true);
  82. if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
  83. jQuery("#btnAdd").hide();
  84. //jQuery("#btnSaveStamp").hide();
  85. }else{
  86. jQuery("#btnAdd").show();
  87. //jQuery("#btnSaveStamp").show();
  88. }
  89. if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
  90. jQuery("#btnPromiseAdd").hide();
  91. //jQuery("#btnSavePromise").hide();
  92. }else{
  93. jQuery("#btnPromiseAdd").show();
  94. //jQuery("#btnSavePromise").show();
  95. }
  96. }
  97. //외주내역 팝업 2018.10.18
  98. jQuery("#btnItem").click(function() {
  99. var win_id = "ItemPop";
  100. var edit_yn = "Y";
  101. if(jQuery("#STATUS_CD").val() != '10') edit_yn = "N" ;
  102. var link = "/cont/outside/ContItemPopup.screen";
  103. 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;
  104. fLayerPop(win_id, link, 950,500, '','', 'NO');
  105. });
  106. jQuery("#btnAdd").click(function() {
  107. var win_id = "_StampDutyPop";
  108. var link = "/cont/outside/stampDutyPop.screen";
  109. link += "?pop_win_id="+win_id
  110. link += "&p_move=I"
  111. link += "&p_cont_mod_id="+"<%=ContInfo.get("SUB_CONT_MOD_ID")%>"
  112. link += "&p_issue_gb="+jQuery("#p_issue_gb").val()
  113. link += "&p_who=E" ;
  114. fLayerPop(win_id, link, 700,250, '', '', 'NO');
  115. /*2016.12.12 인지세 변경
  116. var rowIdx = sheet2.DataInsert(-1);
  117. if(jQuery("#p_issue_gb").val()=="10"){
  118. sheet2.SetCellValue(rowIdx, "STAMP_DUTY_ISSUE_GB", "10");
  119. }else{
  120. sheet2.SetCellValue(rowIdx, "STAMP_DUTY_ISSUE_GB", "20");
  121. } */
  122. });
  123. jQuery("#btnPromiseAdd").click(function() {
  124. var rowIdx = sheet3.DataInsert(-1);
  125. if(jQuery("#p_promise_gb").val()=="10"){
  126. sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "10");
  127. }else{
  128. sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "20");
  129. }
  130. });
  131. function StampDutyClose(result){
  132. if(result.length > 0){
  133. $("#O_USER_NAME").val(result[1]);
  134. $("#O_DIVISION").val(result[3]);
  135. $("#O_POSITION").val(result[5]);
  136. $("#O_TEL_NUM").val(result[6]);
  137. $("#O_HP").val(result[7]);
  138. $("#O_EMAIL").val(result[8]);
  139. $("#O_ACCT_ID").val(result[9]);
  140. }
  141. fLayerPopClose('_searchUserPopup');
  142. }
  143. jQuery("#btnSaveStamp").click(function() {
  144. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  145. for(i=1; i <= sheet2.RowCount(); i++){
  146. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  147. alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
  148. return;
  149. }
  150. }
  151. }
  152. if (confirm("저장하시겠습니까?")) {
  153. var f = document.form1;
  154. jQuery("#fevent").val("STAMP_DUTY_GB_SAVE");
  155. submitXmlRequest("/cont/outside/ContDetail_form.screen", "STAMP_DUTY_GB_SAVE", f);
  156. }
  157. });
  158. jQuery("#btnSavePromise").click(function() {
  159. if(jQuery('#p_promise_gb').val() == '00' && sheet3.GetTotalRows() != 0 ){
  160. for(i=1; i <= sheet3.RowCount(); i++){
  161. if(sheet3.GetCellValue(i, "STATUS")!="D"){
  162. alert("서약서를 미발행으로 등록하려면\n서약서가 등록되어있거나 등록해서는 안됩니다.\n서약서를 삭제하여 주십시오.");
  163. return;
  164. }
  165. }
  166. }
  167. if (confirm("저장하시겠습니까?")) {
  168. doSavePromise();
  169. }
  170. });
  171. /**
  172. * Application Initialize
  173. */
  174. jQuery("#ELEC_CON_YN1").click(function() {
  175. jQuery("#ELEC_CON_YN1").attr("checked",true);
  176. jQuery("#ELEC_CON_YN2").attr("checked",false);
  177. });
  178. jQuery("#ELEC_CON_YN2").click(function() {
  179. jQuery("#ELEC_CON_YN1").attr("checked",false);
  180. jQuery("#ELEC_CON_YN2").attr("checked",true);
  181. });
  182. jQuery("#btnSave").click(function() {
  183. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  184. for(i=1; i <= sheet2.RowCount(); i++){
  185. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  186. alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
  187. return;
  188. }
  189. }
  190. }
  191. if(ck()){
  192. alert("[전자 계약 여부]는 필수 입니다.");
  193. return;
  194. }
  195. if(!valCheck()){
  196. return;
  197. }
  198. /*2016.5.11 마이너스 세금계산서 발행하는 것으로
  199. if(parseFloat_isNaN(jQuery("#con_supply_tamt").val().replace(/,/gi, "")) < parseFloat_isNaN(jQuery("#MIN_CONT_SUPPLY_TAMT").val().replace(/,/gi, ""))){
  200. alert("공급가액 과세가"+jQuery("#MIN_CONT_SUPPLY_TAMT").val()+ "이 금액보다 크거나 같아야 합니다.");
  201. return;
  202. }
  203. if(parseFloat_isNaN(jQuery("#con_supply_namt").val().replace(/,/gi, "")) < parseFloat_isNaN(jQuery("#MIN_CONT_SUPPLY_NAMT").val().replace(/,/gi, ""))){
  204. alert("공급가액 면세가"+jQuery("#MIN_CONT_SUPPLY_NAMT").val()+ "이 금액보다 크거나 같아야 합니다.");
  205. return;
  206. }*/
  207. if(!chkContHtml()){
  208. return;
  209. }
  210. if (confirm("저장 하시겠습니까?")){
  211. var f = document.form1;
  212. submitXmlRequest("/cont/outside/ContDetail_form.screen", "PARTNER_EMP_CHK", f, "VALUEOBJECT");
  213. document.form1.isSubmit = false;
  214. /* var f = document.form1;
  215. jQuery("#fevent").val("FORM_SAVE");
  216. submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f); */
  217. }
  218. });
  219. jQuery("#btnMove").click(function() {
  220. if (confirm("계약대상이동 하시겠습니까?")){
  221. var f = document.form1;
  222. jQuery("#fevent").val("FORM_MOVE");
  223. submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_MOVE", f);
  224. }
  225. });
  226. jQuery("#btnSignCall").click(function() {
  227. if(jQuery("#ELEC_CON_YN2").attr("checked") == "checked"){
  228. alert("오프라인 계약이라서 서명 요청을 할 수 없습니다.");
  229. return;
  230. }else{
  231. /* if(!stampDutyRowCheck()){
  232. return;
  233. }
  234. if(!stampDutyCheck()){
  235. return;
  236. } */
  237. if (confirm("업체에 서명 요청 하시겠습니까?")){
  238. var f = document.form1;
  239. jQuery("#fevent").val("SIGN_CALL");
  240. submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_CALL", f);
  241. }
  242. }
  243. });
  244. jQuery("#btnReSignCall").click(function() {
  245. if (confirm("서명을 취소하게 되면 업체에서 다시 서명을 진행 해야 합니다.\n\n서명을 취소 하시겠습니까?")){
  246. var f = document.form1;
  247. jQuery("#fevent").val("SIGN_CALL");
  248. submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_CALL", f);
  249. }
  250. });
  251. jQuery("#btnSignOk").click(function() {
  252. var stampMsg = '';
  253. //2016.12.8 날짜확인 추가. 계약일로부터 29일 경과한 경우, 계약기간이 만료된 경우.
  254. var sCondate = "<%=ContInfo.get("CON_DATE").replaceAll("-","").substring(0,8) %>";
  255. var sEnddate = "<%=ContInfo.get("END_WORK_DATE").replaceAll("-","").substring(0,8)%>";
  256. if ("<%=ContInfo.get("MOD_NO")%>" == "0"){
  257. if ( sCondate < "<%= sTarget%>" || sEnddate < "<%= sToday%>" ) {
  258. stampMsg = "해당 계약은 계약일로부터 30일 경과 또는 계약기간이 만료된 계약으로 고용/산재보험 하수급인사업주 승인신청 및 하도급대금지급보증서 발급이 불가합니다.\n\n ";
  259. stampMsg = stampMsg + "계속 진행하시겠습니까?";
  260. if (!confirm(stampMsg)){
  261. return ;
  262. }
  263. }
  264. }
  265. stampMsg = '서명 하시겠습니까?';
  266. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  267. alert("인지세 발급 구분이 미발행일시 등록 된 인지세가 없어야 합니다. 삭제하여 주십시오.");
  268. return;
  269. }else{
  270. if(!stampDutyRowCheck()){
  271. return;
  272. }
  273. if(!stampDutyCheck()){
  274. return;
  275. }
  276. if(!promiseRowCheck()){
  277. return;
  278. }
  279. if(!promiseCheck()){
  280. return;
  281. }
  282. var chgCont = jQuery("#ChgCont").val();
  283. if(chgCont != "Y"){
  284. if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() == 0 ){
  285. alert("등록 된 인지세가 없습니다.");
  286. return;
  287. }else if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() != 0 ){
  288. var ordAmt = parseInt(jQuery('#con_amt').val().replace(/,/gi,""));
  289. var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
  290. if( ordAmt <= 10000000 ){
  291. if( stampDutyTax != 0 ) {
  292. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 이하 : 0원\n\n서명 하시겠습니까?';
  293. }
  294. }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
  295. if( stampDutyTax != 20000 ) {
  296. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 초과 ~ 3천만원이하 : 2만원\n\n서명 하시겠습니까?';
  297. }
  298. }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
  299. if( stampDutyTax != 40000 ) {
  300. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n3천만원 초과 ~ 5천만원이하 : 4만원\n\n서명 하시겠습니까?';
  301. }
  302. }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
  303. if( stampDutyTax != 70000 ) {
  304. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n5천만원 초과 ~ 1억원이하 : 7만원\n\n서명 하시겠습니까?';
  305. }
  306. }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
  307. if( stampDutyTax != 150000 ) {
  308. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1억원 초과 ~ 10억원이하 : 15만원\n\n서명 하시겠습니까?';
  309. }
  310. }else if( ordAmt > 1000000000 ) {
  311. if( stampDutyTax != 350000 ) {
  312. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n10억원 초과 : 35만원\n\n서명 하시겠습니까?';
  313. }
  314. }
  315. }
  316. }else{
  317. var befOrdAmt = parseFloat_isNaN(jQuery("#o_con_amt").val().replace(/,/gi,""));
  318. var ordAmt = parseFloat_isNaN(jQuery('#con_amt').val().replace(/,/gi,""));
  319. var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
  320. var befDutyTax = 0 ;
  321. var dutyTax = 0;
  322. var remainTax = 0;
  323. if( befOrdAmt <= 10000000 ){
  324. befDutyTax = 0;
  325. }else if( befOrdAmt > 10000000 && befOrdAmt <= 30000000 ) {
  326. befDutyTax = 20000;
  327. }else if( befOrdAmt > 30000000 && befOrdAmt <= 50000000 ) {
  328. befDutyTax = 40000;
  329. }else if( befOrdAmt > 50000000 && befOrdAmt <= 100000000 ) {
  330. befDutyTax = 70000;
  331. }else if( befOrdAmt > 100000000 && befOrdAmt <= 1000000000 ) {
  332. befDutyTax = 150000;
  333. }else if( befOrdAmt > 1000000000 ) {
  334. befDutyTax = 350000;
  335. }
  336. if( ordAmt <= 10000000 ){
  337. dutyTax = 0;
  338. }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
  339. dutyTax = 20000;
  340. }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
  341. dutyTax = 40000;
  342. }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
  343. dutyTax = 70000;
  344. }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
  345. dutyTax = 150000;
  346. }else if( ordAmt > 1000000000 ) {
  347. dutyTax = 350000;
  348. }
  349. remainTax = dutyTax - befDutyTax;
  350. if(remainTax > 0){
  351. if( remainTax != stampDutyTax ){
  352. stampMsg = '변경계약금액에 따른 인지세가 틀립니다.\n\n'+num2han2(remainTax)+'원\n\n서명 하시겠습니까?';
  353. }
  354. }
  355. }
  356. }
  357. if (confirm(stampMsg)){
  358. var f = document.form1;
  359. jQuery("#fevent").val("SIGN_OK");
  360. submitXmlRequest("/cont/outside/ContDetail_form.screen", "SIGN_OK", f);
  361. }
  362. });
  363. jQuery("#btnComplete").click(function() {
  364. var stampMsg = '계약을 완료 하시겠습니까?';
  365. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  366. alert("인지세 발급 구분이 미발행일시 등록 된 인지세가 없어야 합니다. 삭제하여 주십시오.");
  367. return;
  368. }else{
  369. if($("#ELEC_CON_YN1").attr("checked") == "checked"){
  370. alert("전자계약 완료 처리는 오프라인 전자계약에 대해서만 처리가 가능합니다.");
  371. return false;
  372. }
  373. if(!stampDutyRowCheck()){
  374. return;
  375. }
  376. if(!stampDutyCheck()){
  377. return;
  378. }
  379. if(!promiseRowCheck()){
  380. return;
  381. }
  382. if(!promiseCheck()){
  383. return;
  384. }
  385. var chgCont = jQuery("#ChgCont").val();
  386. if(chgCont != "Y"){
  387. if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() == 0 ){
  388. alert("등록 된 인지세가 없습니다.");
  389. return;
  390. }else if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() != 0 ){
  391. var ordAmt = parseInt(jQuery('#con_amt').val().replace(/,/gi,""));
  392. var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
  393. if( ordAmt <= 10000000 ){
  394. if( stampDutyTax != 0 ) {
  395. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 이하 : 0원\n\n계약을 완료 하시겠습니까?';
  396. }
  397. }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
  398. if( stampDutyTax != 20000 ) {
  399. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 초과 ~ 3천만원이하 : 2만원\n\n계약을 완료 하시겠습니까?';
  400. }
  401. }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
  402. if( stampDutyTax != 40000 ) {
  403. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n3천만원 초과 ~ 5천만원이하 : 4만원\n\n계약을 완료 하시겠습니까?';
  404. }
  405. }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
  406. if( stampDutyTax != 70000 ) {
  407. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n5천만원 초과 ~ 1억원이하 : 7만원\n\n계약을 완료 하시겠습니까?';
  408. }
  409. }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
  410. if( stampDutyTax != 150000 ) {
  411. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1억원 초과 ~ 10억원이하 : 15만원\n\n계약을 완료 하시겠습니까?';
  412. }
  413. }else if( ordAmt > 1000000000 ) {
  414. if( stampDutyTax != 350000 ) {
  415. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n10억원 초과 : 35만원\n\n계약을 완료 하시겠습니까?';
  416. }
  417. }
  418. }
  419. }else{
  420. var befOrdAmt = parseFloat_isNaN(jQuery("#o_con_amt").val().replace(/,/gi,""));
  421. var ordAmt = parseFloat_isNaN(jQuery('#con_amt').val().replace(/,/gi,""));
  422. var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
  423. var befDutyTax = 0 ;
  424. var dutyTax = 0;
  425. var remainTax = 0;
  426. if( befOrdAmt <= 10000000 ){
  427. befDutyTax = 0;
  428. }else if( befOrdAmt > 10000000 && befOrdAmt <= 30000000 ) {
  429. befDutyTax = 20000;
  430. }else if( befOrdAmt > 30000000 && befOrdAmt <= 50000000 ) {
  431. befDutyTax = 40000;
  432. }else if( befOrdAmt > 50000000 && befOrdAmt <= 100000000 ) {
  433. befDutyTax = 70000;
  434. }else if( befOrdAmt > 100000000 && befOrdAmt <= 1000000000 ) {
  435. befDutyTax = 150000;
  436. }else if( befOrdAmt > 1000000000 ) {
  437. befDutyTax = 350000;
  438. }
  439. if( ordAmt <= 10000000 ){
  440. dutyTax = 0;
  441. }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
  442. dutyTax = 20000;
  443. }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
  444. dutyTax = 40000;
  445. }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
  446. dutyTax = 70000;
  447. }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
  448. dutyTax = 150000;
  449. }else if( ordAmt > 1000000000 ) {
  450. dutyTax = 350000;
  451. }
  452. remainTax = dutyTax - befDutyTax;
  453. if(remainTax > 0){
  454. if( remainTax != stampDutyTax ){
  455. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n'+num2han2(remainTax)+'원\n\n계약을 완료 하시겠습니까?';
  456. }
  457. }
  458. }
  459. }
  460. if (confirm(stampMsg)){
  461. var f = document.form1;
  462. jQuery("#fevent").val("END_CONT");
  463. submitXmlRequest("/cont/outside/ContDetail_form.screen", "END_CONT", f);
  464. }
  465. });
  466. jQuery("#btnWriteEnd").click(function() {
  467. /* if(!stampDutyRowCheck()){
  468. return;
  469. }
  470. if(!stampDutyCheck()){
  471. return;
  472. } */
  473. //2015.11.23 확정될때까지 보류.
  474. //과세,면세 금액 둘다 있는 경우 ->기존과 동일
  475. //과세금액만 있는 경우 - 안분계산서, 불공제만 선택가능
  476. /*if ( parseFloat_isNaN(jQuery("#con_supply_namt").val().replace(/,/gi, "")) == 0 ) {
  477. var v_proof = jQuery("#proof_cd").val();
  478. if (v_proof != '206' && v_proof != '210' ){
  479. alert('과세금액만 있는경우 증빙종류는 안분계산서, 불공제만 가능합니다.');
  480. return ;
  481. }
  482. }*/
  483. if (confirm("작성중인 계약서를 완료처리 하시겠습니까?")){
  484. var f = document.form1;
  485. jQuery("#fevent").val("WRITE_END");
  486. submitXmlRequest("/cont/outside/ContDetail_form.screen", "WRITE_END", f);
  487. }
  488. });
  489. jQuery("#btnReject").click(function() {
  490. if (confirm("작성중인 계약서를 반려 요청 하시겠습니까?")){
  491. var f = document.form1;
  492. jQuery("#fevent").val("CONT_REJECT");
  493. submitXmlRequest("/cont/outside/ContDetail_form.screen", "CONT_REJECT", f);
  494. }
  495. });
  496. jQuery("#btnPayGuarComp").click(function() {
  497. var mod_gb = "<%=ContInfo.get("MOD_GB")%>";
  498. var warr_status = "<%=ContInfo.get("WARR_STATUS")%>";
  499. if (confirm("하도급대금지급보증서 확인 요청 하시겠습니까?")){
  500. if(mod_gb == "02" || mod_gb == "20" || mod_gb == "22"){
  501. alert("해당 계약서는 하도급대금지급보증서 대상이 아닙니다. \n보증완료 상태로 변경합니다.");
  502. }else{
  503. if(warr_status == "00"){
  504. if(confirm("해당 계약서는 하도급대금지급보증서 미발급 상태입니다.\n계속 진행하시겠습니까?")){
  505. }else{
  506. return;
  507. }
  508. }
  509. }
  510. var f = document.form1;
  511. jQuery("#fevent").val("CONT_PAY_GUAR");
  512. submitXmlRequest("/cont/outside/ContDetail_form.screen", "CONT_PAY_GUAR", f);
  513. }
  514. });
  515. //계약 작성완료 상태에서 반려로 대체
  516. /*
  517. jQuery("#btnReject").click(function() {
  518. if (confirm("보증 정보에 대해서 반려 요청 하시겠습니까?")){
  519. var win_id = "editcall_pop";
  520. var link = "/cont/outside/RejectReasonPopup.screen";
  521. link += "?pop_win_id="+win_id+"&SUB_CONT_MOD_ID="+$("#SUB_CONT_MOD_ID").val();
  522. fLayerPop(win_id, link, 600,180, '','', 'NO');
  523. }
  524. });
  525. */
  526. //시행 결의
  527. jQuery("#btnResolve").click(function() {
  528. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  529. for(i=1; i <= sheet2.RowCount(); i++){
  530. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  531. alert("인지세 발급 구분을 미발행으로 등록하려면\n인지세가 등록되어있거나 등록해서는 안됩니다.\n인지세를 삭제하여 주십시오.");
  532. return;
  533. }
  534. }
  535. }
  536. if (confirm("변경 계약에 대해서 결재 요청 하시겠습니까?")){
  537. document.form1.isSubmit = false;
  538. var f = document.form1;
  539. var sign_cont_mod_id = $("#SUB_CONT_MOD_ID").val();
  540. dlgSignForm('ebid_ocpoD', '/cont/outside/contSign.screen?sign_cont_mod_id='+sign_cont_mod_id+'^acct_id='+"<%=user.get("ACCT_ID")%>");
  541. }
  542. });
  543. jQuery("#btnSavePayItem").click(function() {
  544. if (confirm("분개유형을 저장 하시겠습니까?")){
  545. var f = document.form1;
  546. jQuery("#fevent").val("SAVE_PAYITEM");
  547. submitXmlRequest("/cont/outside/ContResult_form.screen", "SAVE_PAYITEM", f);
  548. }
  549. });
  550. //변경계약 삭제
  551. jQuery("#btnDel").click(function() {
  552. if (confirm("변경계약을 삭제 하시겠습니까?")){
  553. var f = document.form1;
  554. jQuery("#fevent").val("FORM_DEL");
  555. submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_DEL", f);
  556. }
  557. });
  558. }
  559. function stampDutyCheck(){
  560. for(i=1; i <= sheet2.RowCount(); i++){
  561. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  562. if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
  563. alert("인지세 "+i+"행의 고유식별번호가 없습니다.");
  564. return false;
  565. }
  566. if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
  567. alert("인지세 "+i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
  568. return false;
  569. }
  570. if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
  571. alert("인지세 "+i+"행의 발행일자가 없습니다.");
  572. return false;
  573. }
  574. if(sheet2.GetCellValue(i, "FILE_ID")==""){
  575. alert("인지세 "+i+"행의 인지세사본이 없습니다.");
  576. return false;
  577. }
  578. }
  579. }
  580. return true;
  581. }
  582. function promiseCheck(){
  583. for(i=1; i <= sheet3.RowCount(); i++){
  584. if(sheet3.GetCellValue(i, "STATUS")!="D"){
  585. if(sheet3.GetCellValue(i, "FILE_ID")==""){
  586. alert("서약서 "+i+"행의 서약서 사본이 없습니다.");
  587. return false;
  588. }
  589. }
  590. }
  591. return true;
  592. }
  593. function ck(){
  594. if($("#ELEC_CON_YN1").attr("checked") == "checked"){
  595. return false;
  596. }
  597. if($("#ELEC_CON_YN2").attr("checked") == "checked"){
  598. return false;
  599. }
  600. return true;
  601. }
  602. function valCheck(){
  603. if(jQuery("#mod_gb").val() == ""){
  604. alert("변경내역을 선택해 주세요");
  605. return false;
  606. }
  607. //변경계약일경우 체크 프로세스 태운다. 2014-11-14 김명호 추가
  608. if(jQuery("#mod_gb").val() != "00"){
  609. if(!changeValCheck()){
  610. return;
  611. }
  612. }
  613. /* for(i=1; i <= sheet2.RowCount(); i++){
  614. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  615. if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
  616. alert(i+"행의 고유식별번호가 없습니다.");
  617. return false;
  618. }
  619. if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
  620. alert(i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
  621. return false;
  622. }
  623. if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
  624. alert(i+"행의 발행일자가 없습니다.");
  625. return false;
  626. }
  627. if(jQuery("#STATUS_CD").val() == '40'){
  628. if(sheet2.GetCellValue(i, "FILE_ID")==""){
  629. alert(i+"행의 인지세사본이 없습니다.");
  630. return false;
  631. }
  632. }
  633. }
  634. } */
  635. if(!checkTelno(jQuery("#O_TEL_NUM").val())) {
  636. alert("전화번호가 올바르지 않은 형식입니다");
  637. jQuery("#O_TEL_NUM").focus();
  638. return false;
  639. }
  640. if(!checkTelno(jQuery("#O_HP").val())) {
  641. alert("휴대폰번호가 올바르지 않은 형식입니다");
  642. jQuery("#O_HP").focus();
  643. return false;
  644. }
  645. if(!checkTelno(jQuery("#C_TEL_NUM").val())) {
  646. alert("전화번호가 올바르지 않은 형식입니다");
  647. jQuery("#C_TEL_NUM").focus();
  648. return false;
  649. }
  650. if(!checkTelno(jQuery("#C_HP").val())) {
  651. alert("휴대폰번호가 올바르지 않은 형식입니다");
  652. jQuery("#C_HP").focus();
  653. return false;
  654. }
  655. if(!checkEmail(jQuery("#O_EMAIL").val())){
  656. alert("이메일 형식이 올바르지 않습니다.");
  657. jQuery("#O_EMAIL").focus();
  658. return false;
  659. }
  660. if(!checkEmail(jQuery("#C_EMAIL").val())){
  661. alert("이메일 형식이 올바르지 않습니다.");
  662. jQuery("#C_EMAIL").focus();
  663. return false;
  664. }
  665. return true;
  666. }
  667. //자동로그인 기능
  668. function f_gologin(login_id,login_pw){
  669. var f = document.form1;
  670. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  671. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  672. return;
  673. }
  674. f.login_id.value = login_id;
  675. f.login_pw.value = login_pw;
  676. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  677. alert("Log-in is being processed.");
  678. };
  679. }
  680. function goListProc(){
  681. var f = document.form1;
  682. f.fevent.value ="";
  683. f.action = "/cont/outside/ContIngList.screen";
  684. f.target = "_self";
  685. f.submit();
  686. }
  687. function doResult(resultObj) {
  688. try {
  689. if( resultObj.getRequestEvent() == "PARTNER_EMP_CHK") {
  690. if( resultObj.getSuccess() ) {
  691. var vo = resultObj.getValueObject();
  692. var cnt = vo.get("EMP_CHK_CNT");
  693. if(cnt > 0){
  694. var f = document.form1;
  695. jQuery("#fevent").val("FORM_SAVE");
  696. submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f);
  697. }else{
  698. if(confirm("등록된 업체담당자 정보와 일치하지 않습니다. 계속진행하시겠습니까?")){
  699. var f = document.form1;
  700. jQuery("#fevent").val("FORM_SAVE");
  701. submitXmlRequest("/cont/outside/ContDetail_form.screen", "FORM_SAVE", f);
  702. }else{
  703. return;
  704. }
  705. }
  706. }else {
  707. dlgErrorMsg(resultObj);
  708. }
  709. document.form1.isSubmit = false;
  710. }
  711. if( resultObj.getRequestEvent() == "FORM_SAVE") {
  712. if( resultObj.getSuccess() ) {
  713. jQuery("#save_gb").val("Y");
  714. doSaveStamp();
  715. doSavePromise();
  716. alert("저장 되었습니다.");
  717. window.location.reload();
  718. }
  719. else {
  720. dlgErrorMsg(resultObj);
  721. }
  722. }
  723. if( resultObj.getRequestEvent() == "STAMP_DUTY_GB_SAVE") {
  724. if( resultObj.getSuccess() ) {
  725. doSaveStamp();
  726. } else {
  727. dlgErrorMsg(resultObj);
  728. }
  729. }
  730. if( resultObj.getRequestEvent() == "SIGN_CALL") {
  731. if( resultObj.getSuccess() ) {
  732. alert("서명 요청이 정상적으로 처리 되었습니다.")
  733. window.location.reload();
  734. } else {
  735. dlgErrorMsg(resultObj);
  736. }
  737. }
  738. if( resultObj.getRequestEvent() == "WRITE_END") {
  739. if( resultObj.getSuccess() ) {
  740. alert("작성 완료 상태로 처리 되었습니다.")
  741. window.location.reload();
  742. } else {
  743. dlgErrorMsg(resultObj);
  744. }
  745. }
  746. if( resultObj.getRequestEvent() == "CONT_REJECT") {
  747. if( resultObj.getSuccess() ) {
  748. alert("계약서에 대해서 반려 처리 되었습니다.\n\n최초 작성자가 다시 수정 할수 있는 상태입니다.")
  749. window.location.reload();
  750. } else {
  751. dlgErrorMsg(resultObj);
  752. }
  753. }
  754. if( resultObj.getRequestEvent() == "SIGN_OK") {
  755. if( resultObj.getSuccess() ) {
  756. alert("서명 정상적으로 처리 되었습니다.")
  757. window.location.href="/cont/outside/ContResultList.screen";
  758. } else {
  759. dlgErrorMsg(resultObj);
  760. }
  761. }
  762. if( resultObj.getRequestEvent() == "END_CONT") {
  763. if( resultObj.getSuccess() ) {
  764. alert("정상적으로 처리 되었습니다.")
  765. window.location.href="/cont/outside/ContResultList.screen";
  766. } else {
  767. dlgErrorMsg(resultObj);
  768. }
  769. }
  770. if( resultObj.getRequestEvent() == "SAVE_PAYITEM") {
  771. if( resultObj.getSuccess() ) {
  772. alert("정상적으로 처리 되었습니다.")
  773. window.location.reload();
  774. } else {
  775. dlgErrorMsg(resultObj);
  776. }
  777. }
  778. //계약서 삭제
  779. if( resultObj.getRequestEvent() == "FORM_DEL") {
  780. if( resultObj.getSuccess() ) {
  781. alert("정상적으로 삭제 처리 되었습니다.")
  782. goListProc();
  783. } else {
  784. dlgErrorMsg(resultObj);
  785. }
  786. }
  787. if( resultObj.getRequestEvent() == "FORM_MOVE") {
  788. if( resultObj.getSuccess() ) {
  789. alert("정상적으로 처리 되었습니다.")
  790. window.location.href="/cont/outside/ContIngList.screen";
  791. } else {
  792. dlgErrorMsg(resultObj);
  793. }
  794. }
  795. if( resultObj.getRequestEvent() == "CONT_PAY_GUAR") {
  796. if( resultObj.getSuccess() ) {
  797. alert("정상적으로 처리 되었습니다.")
  798. window.location.reload();
  799. } else {
  800. dlgErrorMsg(resultObj);
  801. }
  802. }
  803. document.form1.isSubmit = false;
  804. }
  805. catch(errorObject) {
  806. showErrorDlg("doResult()", errorObject);
  807. }
  808. }
  809. /*담당자 호출*/
  810. function SearchUser(NAME,CODE){
  811. var win_id = "_searchUserPopup";
  812. var link = "/lib/dlgSearchUserPop.screen";
  813. link += "?pop_win_id="+win_id;
  814. link += "&deptNameYn=outside";
  815. link += "&NAME=" + NAME;
  816. link += "&CODE=" + CODE;
  817. fLayerPop(win_id, link, 700,400, '', '', 'NO');
  818. }
  819. /*담당자 호출 Return Value 처리*/
  820. function SearchUserClose(result){
  821. if(result.length > 0){
  822. $("#O_USER_NAME").val(result[1]);
  823. $("#O_DIVISION").val(result[3]);
  824. $("#O_POSITION").val(result[5]);
  825. $("#O_TEL_NUM").val(result[6]);
  826. $("#O_HP").val(result[7]);
  827. $("#O_EMAIL").val(result[8]);
  828. $("#O_ACCT_ID").val(result[9]);
  829. }
  830. fLayerPopClose('_searchUserPopup');
  831. }
  832. var text = 'a\nb';
  833. /*계약서 pdf script start*/
  834. function chkContHtml(){
  835. var f = document.form1;
  836. var c = $("#PDF_FILE_CNT").val();
  837. if(validate(f)){
  838. splitHtml(f, 'cont_html', false, c);
  839. splitHtml(f, 'cont_html_rm', true, c);
  840. //공사기간에 대해서 준공일이 착공일 보다 빠르면 안됨 처리
  841. 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){
  842. alert("공사 기간에 준공일이 착공일 보다 빠르게 셋팅 되었습니다.\n\n준공일을 다시 설정해 주시기 바랍니다.");
  843. return false;
  844. }
  845. //기성금에 대해서 현금 + 어음 은 100% 체크
  846. if(parseInt(f.pay_way_cash.value)+parseInt(f.pay_way_bill.value) != 100){
  847. alert("지급 방법에 현금과 어음의 합은 100%로 설정해 주시기 바랍니다.");
  848. f.pay_way_cash.focus();
  849. return false;
  850. }
  851. return true;
  852. }
  853. return false;
  854. }
  855. /*계약서 pdf script end*/
  856. function output(msg) {
  857. $('<li>').text(msg).appendTo($('#output'));
  858. }
  859. function replace(str) {
  860. return str.replace('\r', 'CR').replace('\n', 'LF');
  861. }
  862. //반려요청 팝업 종료후 액션
  863. function EditCallReasonClose(returnValue){
  864. if(returnValue == null)
  865. fLayerPopClose('editcall_pop');
  866. if(returnValue[0] == 0){
  867. fLayerPopClose('editcall_pop');
  868. goListProc();
  869. }
  870. }
  871. //첨부파일
  872. function doAttachFileDiv(obj) {
  873. if(obj==''){
  874. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  875. }
  876. else if(obj != ''){
  877. var edtYN ="N";
  878. //2015.3.25 반려일때 첨부추가 가능. (10작성중, 41반려)
  879. if((document.getElementById("STATUS_CD").value=="10") || (document.getElementById("STATUS_CD").value=="41")){edtYN="Y";}
  880. viewFileListNew('SUB_CONT_MOD_ID', obj.value, document.getElementById("attach_file_view"), edtYN, "cont/outside/<%=ContInfo.get("SUB_CONT_MOD_ID")%>");
  881. }
  882. }
  883. /**
  884. * 첨부파일 예약 함수
  885. */
  886. function fileDown(file_id){
  887. var url="/common/file/FileDownloadServlet";
  888. url += "?file_id=" + file_id;
  889. 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")
  890. }
  891. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  892. var editFile = "";
  893. if(obj==''){
  894. alert("After you have saved, you can attach a file.");
  895. }
  896. else if(obj != ''){
  897. if(fObj.guarStatus.value != "02"){editFile="Y";}else{editFile="Y";}
  898. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contOutWarrPopup");
  899. }
  900. }
  901. //결재
  902. function dlgSignForm( sign_class_cd, uri ) {
  903. var f = document.form1;
  904. var sheet1 = document.all.sheet1;
  905. var url = "/contOutsideSign/contSign_form.screen";
  906. url += "?sign_class_cd=" + sign_class_cd;
  907. url += "&uri=" + uri;
  908. url += "&sign_cont_mod_id=" + $("#SUB_CONT_MOD_ID").val();
  909. url += "&acct_type=1";
  910. window.open(url, "_blank","width=200,height=100,SCROLLBARS=no");
  911. }
  912. //보증정보팝업 호출
  913. function popContWarr(wG, wSeq, wCauseCd) {
  914. var win_id = "contOutWarrPopup";
  915. var param = "";
  916. var param = "?subContModId=" + jQuery("#SUB_CONT_MOD_ID").val();
  917. var param = param + "&warrGubun=" + wG;
  918. var param = param + "&warrSeq=" + wSeq;
  919. var param = param + "&causeCode=" + wCauseCd;
  920. var param = param + "&wonWarr=" + jQuery("#WON_WARR").val();
  921. var param = param + "&viewDiv=CONT";
  922. var param = param + "&pop_win_id=" + win_id;
  923. var param = param + "&sModule=EB";
  924. var url = "/portal/guar/contOutWarrPopup.screen"+param;
  925. fLayerPop(win_id, url, 560,350, '','', 'YES');
  926. }
  927. //보증정보팝업 종료후 액션
  928. function popContWarrClose(returnValue){
  929. if(returnValue == null)
  930. fLayerPopClose('contOutWarrPopup');
  931. if(returnValue[0] == 0){
  932. fLayerPopClose('contOutWarrPopup');
  933. location.reload();
  934. }
  935. }
  936. function corpPopup(corpID){
  937. var url = "/cont/outside/ContTargetPopup.screen";
  938. url += "?p_corp_id=" + corpID;
  939. url += "&sModule="+"LM";
  940. window.open(url, "_ContTargetPop","width=1000,height=650,SCROLLBARS=no");
  941. }
  942. function erpCheckYn(){
  943. alert("계약완료 후 변경 불가능합니다.");
  944. }
  945. </SCRIPT>
  946. <modular:search id="form1">
  947. <modular:key id="fevent" />
  948. </modular:search>
  949. <form id="form1" name="form1" method="post" modular:type="search">
  950. <INPUT type="hidden" name="fevent" id="fevent" value="<%= params.get("fevent") %>">
  951. <INPUT type="hidden" name="save_gb" id="save_gb" value="">
  952. <INPUT type="hidden" name="acct_id" value="<%= params.get("acct_id") %>">
  953. <!-- 검색 조건 시작-->
  954. <INPUT type="hidden" name="p_dept_cd" value="<%= params.get("p_dept_cd") %>">
  955. <INPUT type="hidden" name="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
  956. <INPUT type="hidden" name="p_dealer_nm" value="<%= params.get("p_dealer_nm") %>">
  957. <INPUT type="hidden" name="p_cont_status" value="<%= params.get("p_cont_status") %>">
  958. <INPUT type="hidden" name="ContFromDt" value="<%= params.get("ContFromDt") %>">
  959. <INPUT type="hidden" name="ContToDt" value="<%= params.get("ContToDt") %>">
  960. <INPUT type="hidden" name="p_build_nm" value="<%= params.get("p_build_nm") %>">
  961. <!-- 검색 조건 끝-->
  962. <INPUT type="hidden" name="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
  963. <INPUT type="hidden" name="SUB_CONT_MOD_ID" value="<%=ContInfo.get("SUB_CONT_MOD_ID")%>">
  964. <INPUT type="hidden" name="O_CORP_ID" value="<%=ContInfo.get("O_CORP_ID")%>">
  965. <INPUT type="hidden" name="C_CORP_ID" value="<%=ContInfo.get("C_CORP_ID")%>">
  966. <INPUT type="hidden" name="STATUS_CD" value="<%=ContInfo.get("STATUS_CD")%>">
  967. <INPUT type="hidden" name="O_VENDCD" value="<%=ContInfo.get("O_VENDCD")%>">
  968. <INPUT type="hidden" name="C_VENDCD" value="<%=ContInfo.get("C_VENDCD")%>">
  969. <INPUT type="hidden" name="O_ACCT_ID" id="O_ACCT_ID" value="<%=ContInfo.get("CON_CHARGE_ID")%>">
  970. <!-- 계약서PDF정보 START-->
  971. <INPUT type="hidden" name="TEMPLATE_CD" value="<%=ContInfo.get("TEMPLATE_CD") %>">
  972. <INPUT type="hidden" name="CON_DOC_NO" value="<%=ContInfo.get("CON_DOC_NO") %>">
  973. <INPUT type="hidden" name="MOD_NO" value="<%=ContInfo.get("MOD_NO") %>">
  974. <INPUT type="hidden" name="PDF_FILE_CNT" value="<%=template.size()%>">
  975. <INPUT type="hidden" name="TRUE_RANDOM" value="<%=ContInfo.get("TRUE_RANDOM") %>">
  976. <!-- 계약서PDF정보 END-->
  977. <!--서명 데이터 정보 START-->
  978. <INPUT type='hidden' name="CONT_HASH" value="<%=ContInfo.get("CONT_HASH") %>">
  979. <INPUT type="hidden" name="O_REG_NO" value="<%=ContInfo.get("O_REG_NO") %>">
  980. <INPUT type="hidden" name="WON_WARR" value="<%=params.get("WON_WARR") %>">
  981. <INPUT type="hidden" name="MIN_CONT_SUPPLY_TAMT" value="<%=Formatter2.currency(ContInfo.get("MIN_CONT_SUPPLY_TAMT"), ContInfo.getInt("SOSUNUM"))%>">
  982. <INPUT type="hidden" name="MIN_CONT_SUPPLY_NAMT" value="<%=Formatter2.currency(ContInfo.get("MIN_CONT_SUPPLY_NAMT"), ContInfo.getInt("SOSUNUM")) %>">
  983. <INPUT type="hidden" name="ChgCont" value="<%=params.get("ChgCont") %>">
  984. <!-- 제목 및 버튼 -->
  985. <table width="100%">
  986. <colgroup>
  987. <col width="500" />
  988. <col width="*" />
  989. </colgroup>
  990. <tr>
  991. <th>
  992. <div align="left" id="title">
  993. <ul>
  994. <li>외주_계약 현황 상세 <font style="font-size:11px">(<%=ContInfo.get("STATUS_NM")%>)</font></li>
  995. </ul>
  996. </div>
  997. </th>
  998. <td align="right">
  999. <%
  1000. if(ContInfo.get("STATUS_CD").equals("10")){
  1001. %>
  1002. <span class="btnSearch center" id="btnMove"><a href="javascript:void(0);">계약대상이동</a></span>
  1003. <%
  1004. if(ContInfo.get("MOD_NO").equals("0")){
  1005. %>
  1006. <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
  1007. <span class="btnSearch center" id="btnWriteEnd"><a href="javascript:void(0);">작성완료</a></span>
  1008. <%
  1009. }else{ //변경계약일경우 상태값에 따라 버튼 변화
  1010. %>
  1011. <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
  1012. <!-- <span class="btnSearch center" id="btnResolve"><a href="javascript:void(0);">결재요청</a></span> -->
  1013. <span class="btnSearch center" id="btnWriteEnd"><a href="javascript:void(0);">작성완료</a></span>
  1014. <span class="btnSearch center" id="btnDel"><a href="javascript:void(0);">변경계약서삭제</a></span>
  1015. <%
  1016. }
  1017. }else if(ContInfo.get("STATUS_CD").equals("16")){ //작성완료(16)
  1018. //승인자만 보이게 처리
  1019. if( storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID")) /* || storage.getRequest().getServerName().equals("localhost") */ ){
  1020. if(ContInfo.get("MOD_GB").equals("02") || ContInfo.get("MOD_GB").equals("20") || ContInfo.get("MOD_GB").equals("22")){ //감액,단축,감액단축 계약시
  1021. %>
  1022. <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
  1023. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
  1024. <% }else{%>
  1025. <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
  1026. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
  1027. <% }
  1028. if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
  1029. %>
  1030. <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
  1031. <%
  1032. }
  1033. }else{%>
  1034. <% if(ContInfo.get("MOD_GB").equals("02") || ContInfo.get("MOD_GB").equals("20") || ContInfo.get("MOD_GB").equals("22")){ //감액,단축,감액단축 계약시%>
  1035. <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
  1036. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
  1037. <% }else{%>
  1038. <span class="btnSearch center" id="btnPayGuarComp"><a href="javascript:void(0);">보증완료</a></span>
  1039. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
  1040. <% }
  1041. }
  1042. }else if(ContInfo.get("STATUS_CD").equals("19")){ //보증완료(19)
  1043. //승인자만 보이게 처리
  1044. if(storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID")) /* || storage.getRequest().getServerName().equals("localhost") */){
  1045. %>
  1046. <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
  1047. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">반려</a></span>
  1048. <%
  1049. if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
  1050. %>
  1051. <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
  1052. <%
  1053. }
  1054. }else{%>
  1055. <span class="btnSearch center" id="btnReject"><a href="javascript:void(0);">회수</a></span>
  1056. <%
  1057. }
  1058. }else if(ContInfo.get("STATUS_CD").equals("18")){
  1059. //승인자만 보이게 처리
  1060. if(storage.getUser().get("acct_id").equals(ContInfo.get("CON_CONFIRM_ID"))){
  1061. %>
  1062. <span class="btnSearch center" id="btnSignCall"><a href="javascript:void(0);">업체 서명요청</a></span>
  1063. <%
  1064. if (ContInfo.get("ELEC_CON_YN").equals("N")) { //오프라인 전자 계약에 대해서만 처리
  1065. %>
  1066. <span class="btnSearch center" id="btnComplete"><a href="javascript:void(0);">계약완료</a></span>
  1067. <%
  1068. }
  1069. }
  1070. }else if(ContInfo.get("STATUS_CD").equals("30")){
  1071. %>
  1072. <span class="btnSearch center" id="btnSignOk"><a href="javascript:void(0);">서명</a></span>
  1073. <span class="btnSearch center" id="btnReSignCall"><a href="javascript:void(0);">서명취소</a></span>
  1074. <%
  1075. }else if((ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){
  1076. %>
  1077. <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
  1078. <%
  1079. }
  1080. %>
  1081. <span class="btnSearch center" id="btnItem"><a href="javascript:void(0);">계약내역</a></span>
  1082. <span class="btnSearch center" id="btnList"><a href="javascript:goListProc();">목록</a></span>
  1083. </td>
  1084. </tr>
  1085. </table>
  1086. <%
  1087. /*
  1088. 계약 정보를 한페이지로 만들어서 include 시킴 (2014-08-14) 김명호
  1089. */
  1090. String isViewWrite;
  1091. String finalYn = "";
  1092. if ((ContInfo.get("STATUS_CD").equals("10")) || (ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){
  1093. isViewWrite = "W";
  1094. }else{
  1095. isViewWrite = "V";
  1096. }
  1097. %>
  1098. <%@ include file="/jsp/ko_KR/buyer/cont/outside/ContInfo.jsp" %>
  1099. <%if ((!ContInfo.get("MODI_REQ_REASON").equals("")) && (ContInfo.get("STATUS_CD").equals("40")) || (ContInfo.get("STATUS_CD").equals("41"))){ //수정 요청 내용이 있을경우 %>
  1100. <div class="application-info magT15">
  1101. <div class="application-sub-title">
  1102. <span class="title">수정요청 사유</span>
  1103. </div>
  1104. </div>
  1105. <TABLE class="form-table">
  1106. <colgroup>
  1107. <col width="120" />
  1108. <col width="*" />
  1109. </colgroup>
  1110. <TR height="25">
  1111. <TH>사유</TH>
  1112. <TD><%=ContInfo.get("MODI_REQ_REASON") %></TD>
  1113. </TR>
  1114. <TR height="25">
  1115. <TH>요청일</TH>
  1116. <TD><%=ContInfo.get("MODI_REQ_DT") %></TD>
  1117. </TR>
  1118. </TABLE>
  1119. <% } %>
  1120. <div class="application-info magT10">
  1121. <div class="application-sub-title">
  1122. <span class="title">계약정보</span>
  1123. </div>
  1124. <div style="text-align:center;">
  1125. <%if ((params.get("ChgCont").equals("Y")) && ContInfo.get("STATUS_CD").equals("10")) { //변경 계약서 일경우 추가 내역%>
  1126. 변경구문
  1127. <select name="mod_gb" onchange="chgModGb(this.value)">
  1128. <option value="">-선택-</option>
  1129. <option value="01" <%=ContInfo.get("MOD_GB").equals("01") ? "selected=selected":""%>>증액</option>
  1130. <option value="02" <%=ContInfo.get("MOD_GB").equals("02") ? "selected=selected":""%>>감액</option>
  1131. <option value="10" <%=ContInfo.get("MOD_GB").equals("10") ? "selected=selected":""%>>연장</option>
  1132. <option value="11" <%=ContInfo.get("MOD_GB").equals("11") ? "selected=selected":""%>>연장증액</option>
  1133. <option value="12" <%=ContInfo.get("MOD_GB").equals("12") ? "selected=selected":""%>>연장감액</option>
  1134. <option value="20" <%=ContInfo.get("MOD_GB").equals("20") ? "selected=selected":""%>>단축</option>
  1135. <option value="21" <%=ContInfo.get("MOD_GB").equals("21") ? "selected=selected":""%>>단축증액</option>
  1136. <option value="22" <%=ContInfo.get("MOD_GB").equals("22") ? "selected=selected":""%>>단축감액</option>
  1137. <option value="98" <%=ContInfo.get("MOD_GB").equals("98") ? "selected=selected":""%>>계약이관</option>
  1138. <option value="99" <%=ContInfo.get("MOD_GB").equals("99") ? "selected=selected":""%>>기타</option>
  1139. </select>
  1140. <% } else { //당초 일경우 기본 값%>
  1141. <input type="hidden" name="mod_gb" id ="mod_gb" value="<%=ContInfo.get("MOD_GB")%>" />
  1142. <% }%>
  1143. <font color="ffffff">......</font>
  1144. ※<span style="background-color:yellow;text-align:center">노랑색</span>은 필수입력사항, <span style="text-align:center;background-color:#CCFF99;">연두색</span>은 계약서에 인쇄되지 않는 항목입니다.
  1145. </div>
  1146. </div>
  1147. <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid black;padding-top:5px">
  1148. <tr>
  1149. <td align="center" bgcolor="#efefef">
  1150. <table width="770px" border="0" cellspacing="0" cellpadding="0">
  1151. <tr>
  1152. <td align="center">
  1153. <%
  1154. for(int i = 0 ; i < template.size(); i ++){
  1155. %>
  1156. <input type="hidden" name="template_seq" value="<%=template.getRow(i).get("SEQ")%>">
  1157. <input type="hidden" name="template_name" value="<%=template.getRow(i).get("TEMPLATE_NAME")%>">
  1158. <input type="hidden" name="template_style" value="<%=template.getRow(i).get("TEMPLATE_STYLE")%>">
  1159. <input type="hidden" name="option_yn" value="<%=template.getRow(i).get("OPTION_YN")%>">
  1160. <% if(i==0){ %>
  1161. <span class="tab_on" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  1162. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  1163. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  1164. </span>&nbsp;
  1165. <% }else{ %>
  1166. <%if(template.getRow(i).get("OPTION_YN").equals("A")){%>
  1167. <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  1168. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  1169. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  1170. </span>
  1171. <%}else if((template.getRow(i).get("OPTION_YN").equals("Y"))){ %>
  1172. <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  1173. <input type="checkbox" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="Y" <%if(template.getRow(i).get("CHECK_YN").equals("Y")){%>checked="checked"<%}%>>
  1174. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  1175. </span>
  1176. <%} %>
  1177. <% } %>
  1178. <%} %>
  1179. </td>
  1180. </tr>
  1181. </table>
  1182. <div id="__html" style="width:770px;border:1px solid black;padding:10px 10px 10px 10px;background-color:#FFFFFF;text-align:left;" >
  1183. <%
  1184. for(int i = 0 ; i < template.size(); i ++){
  1185. String template_html = ClobUtils.getClob((Clob)template.getRow(i).getObject("TEMPLATE_HTML"));
  1186. String divHidden = template.getRow(i).get("SEQ").equals("0")?"":"none";
  1187. %>
  1188. <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")%>">
  1189. <%= template_html%>
  1190. </div>
  1191. <%} %>
  1192. </div>
  1193. </td>
  1194. </tr>
  1195. </table>
  1196. <div class="application-info magT15">
  1197. <div class="application-sub-title">
  1198. <span class="title">계약서류</span>
  1199. </div>
  1200. </div>
  1201. <TABLE class="form-table">
  1202. <colgroup>
  1203. <col width="120" />
  1204. <col width="*" />
  1205. </colgroup>
  1206. <TR height="25">
  1207. <TH>자동생성</TH>
  1208. <TD>
  1209. <table width="100%">
  1210. <colgroup>
  1211. <col width="100%" />
  1212. </colgroup>
  1213. <TR height="25">
  1214. <TD>
  1215. <div id="auto_attach_file_view" class="attach_file_view">
  1216. <ul>
  1217. <%
  1218. for(int i=0;i<autofile_list.size();i++){
  1219. %>
  1220. <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>
  1221. <%
  1222. }
  1223. %>
  1224. </ul>
  1225. </div>
  1226. </TD>
  1227. </TR>
  1228. </TABLE>
  1229. </TD>
  1230. </TR>
  1231. <TR height="25">
  1232. <TH>직접첨부</TH>
  1233. <TD>
  1234. <table width="100%">
  1235. <colgroup>
  1236. <col width="50%" />
  1237. <col width="50%" />
  1238. </colgroup>
  1239. <tr>
  1240. <td>
  1241. <div id="attach_file_view" class="attach_file_view">
  1242. <!-- 첨부 파일 화면에 바로보일때 사용 -->
  1243. <%=FileManager.getFileListForDiv("SUB_CONT_MOD_ID", ContInfo.get("SUB_CONT_MOD_ID")) %>
  1244. </div>
  1245. </td>
  1246. <td>
  1247. <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;'>
  1248. </td>
  1249. </tr>
  1250. </table>
  1251. </TD>
  1252. </TR>
  1253. </TABLE>
  1254. <%
  1255. /*
  1256. 보증 목록을 include 시킴 (2014-10-16) 김명호
  1257. */
  1258. 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"))){
  1259. if(warrList.size() > 0){
  1260. %>
  1261. <%@ include file="/jsp/ko_KR/buyer/cont/outside/guarList.jsp" %>
  1262. <%
  1263. }
  1264. }
  1265. %>
  1266. </form>
  1267. <script type="text/javascript">
  1268. <!--
  1269. /**
  1270. * 상세 코드 검색
  1271. */
  1272. function popSearchCodeDetail(bcd)
  1273. {
  1274. var win_id = "_searchCodePopup";
  1275. var link = "/sycs/code/dlgCodePopup.screen";
  1276. link += "?pop_win_id="+win_id;
  1277. link += "&p_basecd="+bcd;
  1278. fLayerPop(win_id, link, 600,400, '', '', 'NO');
  1279. }
  1280. function SearchCodeDetailClose(result){
  1281. if(result != null){
  1282. if(result[2]=="SUB_ACMP_PAY_TYPE"){
  1283. replaceInput(result[0],"pay_cond_gb" ,__html);
  1284. replaceInput(result[1],"spn_pay_cond_gb" ,__html);
  1285. }
  1286. }
  1287. fLayerPopClose('_searchCodePopup');
  1288. }
  1289. //-->
  1290. </script>
  1291. <!-- =========사인 요청 상태이후 (20)에는 입력을 받지 못하게 처리 (김명호 : 2014-07-21)============== -->
  1292. <script>
  1293. //window.addEventListener("onload",convertHtml)
  1294. <%
  1295. 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"))){
  1296. %>
  1297. window.onload = function() {
  1298. convertHtml();
  1299. };
  1300. <%
  1301. }
  1302. %>
  1303. function convertHtml(){
  1304. if(!document.getElementById("__html"))return;
  1305. var elements = document.getElementById("__html").getElementsByTagName("input");
  1306. for(var i = 0; i < elements.length; i++){
  1307. var element = elements[i];
  1308. setDisabled(element);
  1309. }
  1310. var elements = document.getElementById("__html").getElementsByTagName("textarea");
  1311. for(var i = 0; i < elements.length; i++){
  1312. var element = elements[i];
  1313. element.className = "input_readonly";
  1314. element.readOnly = true;
  1315. }
  1316. var elements = document.getElementById("__html").getElementsByTagName("img");
  1317. for(var i = 0; i < elements.length; i++){
  1318. var element = elements[i];
  1319. element.style.display="none";
  1320. }
  1321. /*협력사에서 안보이는 부분숨기는 처리*/
  1322. var elements = getElementsByClass("cl_no_view");
  1323. for(var i = 0; i < elements.length; i++){
  1324. var element = elements[i];
  1325. element.style.display="none";
  1326. }
  1327. }
  1328. </script>