PurContDetail.jsp 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889
  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="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="kr.co.hsnc.common.config.WAFConfig" %>
  14. <%@ include file="/jsp/work/taglib.jsp" %>
  15. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  16. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  17. <%@page import="java.net.URLEncoder"%>
  18. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  19. <%
  20. ctx.init(request, response);
  21. HandlerStorage storage = ctx.getHandlerStorage();
  22. ValueObject params = storage.getParams();
  23. ValueObject user = storage.getUser();
  24. String event = storage.getEvent();
  25. // System.out.println("event ======== : " + ContInfo.get("DOC_ETC_IN"));
  26. // RowSet CorpRowSet = storage.getRowSet("CorpRowSet");
  27. ValueObject ContInfo = storage.getValueObject("ContInfo");
  28. /*계약서식 정보 */
  29. RowSet template = storage.getRowSet("template");
  30. /*계약서식 FILE */
  31. RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");
  32. /*보증 정보 LIst */
  33. RowSet warrList = storage.getRowSet("warrList");
  34. /*보증 발급 완료된 갯수 */
  35. RowSet warrCount = storage.getRowSet("warrCount");
  36. /*표준 미연동 계약 정보 */
  37. //ValueObject pricesysInfo = storage.getValueObject("pricesysInfo");
  38. %>
  39. <LINK href="/css/cont/cont_style.css" rel="stylesheet" type="text/css">
  40. <script language="javascript" src="/js/cont/cont_util.js"></script>
  41. <script language="javascript" src="/js/cont/lib.validate.js"></script>
  42. <SCRIPT language="JavaScript">
  43. /*예약함수*/
  44. function _onReady(){
  45. /* STAMP_DUTY, PROMISE_DOC 인클루드 페이지 기능 */
  46. gridInit2(sheet2);
  47. gridInit3(sheet3);
  48. gridInit4(sheet4);
  49. doSearchStamp();
  50. doSearchPromise();
  51. doSearchPricesys();
  52. if(jQuery("#STATUS_CD").val() == '20' && jQuery("#p_issue_gb").val() == '20'){
  53. jQuery("#p_issue_gb").attr("disabled",true);
  54. jQuery("#p_promise_gb").attr("disabled",false);
  55. jQuery("#btnAdd").show();
  56. jQuery("#btnSaveStamp").show();
  57. jQuery("#btnPromiseAdd").show();
  58. jQuery("#btnSavePromise").show();
  59. }else{
  60. jQuery("#p_issue_gb").attr("disabled",true);
  61. jQuery("#btnAdd").hide();
  62. jQuery("#btnSaveStamp").hide();
  63. jQuery("#btnPromiseAdd").hide();
  64. jQuery("#btnSavePromise").hide();
  65. }
  66. jQuery("#btnAdd").click(function() {
  67. var rowIdx = sheet2.DataInsert(-1);
  68. sheet2.SetCellValue(rowIdx, "STAMP_DUTY_ISSUE_GB", "20");
  69. });
  70. jQuery("#btnPromiseAdd").click(function() {
  71. var rowIdx = sheet3.DataInsert(-1);
  72. if(jQuery("#p_promise_gb").val()=="10"){
  73. sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "10");
  74. }else{
  75. sheet3.SetCellValue(rowIdx, "PROMISE_DOC_TYPE_GB", "20");
  76. }
  77. });
  78. jQuery("#btnSaveStamp").click(function() {
  79. /* for(i=1; i <= sheet2.RowCount(); i++){
  80. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  81. if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
  82. alert(i+"행의 고유식별번호가 없습니다.");
  83. return false;
  84. }
  85. if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
  86. alert(i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
  87. return false;
  88. }
  89. if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
  90. alert(i+"행의 발행일자가 없습니다.");
  91. return false;
  92. }
  93. }
  94. } */
  95. if (confirm("저장하시겠습니까?")) {
  96. jQuery("#fevent").val("SAVE_STAMP_LIST");
  97. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/StampList_sheet.screen";
  98. var result = Modular.view.IBSheet7.doSave(sheet2, url, jQuery("#form1"), false);
  99. }
  100. });
  101. jQuery("#btnSavePromise").click(function() {
  102. if(jQuery('#p_promise_gb').val() == '00' && sheet3.GetTotalRows() != 0 ){
  103. for(i=1; i <= sheet3.RowCount(); i++){
  104. if(sheet3.GetCellValue(i, "STATUS")!="D"){
  105. alert("서약서를 미발행으로 등록하려면\n서약서가 등록되어있거나 등록해서는 안됩니다.\n서약서를 삭제하여 주십시오.");
  106. return;
  107. }
  108. }
  109. }
  110. if (confirm("저장하시겠습니까?")) {
  111. doSavePromise();
  112. }
  113. });
  114. jQuery("#btnPricesysAdd").click(function() {
  115. if(jQuery("#p_pricesys_gb").val()=="01"){ //미연동일 경우 팝업으로 입력
  116. popPricesys();
  117. }else{ //연동일 경우 행추가 해서 입력
  118. if(sheet4.RowCount() == 1){
  119. return;
  120. }
  121. var rowIdx = sheet4.DataInsert(-1);
  122. sheet4.SetCellValue(rowIdx, "PRICE_SYS_YN", "02");
  123. sheet4.SetCellValue(rowIdx, "OBJECT_NM", "별도 협의");
  124. sheet4.SetCellValue(rowIdx, "SYS_REASON", "별도 협의");
  125. sheet4.SetCellValue(rowIdx, "FILE_YN", "");
  126. }
  127. });
  128. jQuery("#btnSavePricesys").click(function() {
  129. if (confirm("저장하시겠습니까?")) {
  130. jQuery("#fevent").val("SAVE_PRICESYS_LIST");
  131. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/PricesysList_sheet.screen";
  132. Modular.view.IBSheet7.doSave(sheet4, url, jQuery("#form1"), false);
  133. }
  134. });
  135. /**
  136. * Application Initialize
  137. */
  138. jQuery("#btnSignOk").click(function() {
  139. var stampMsg = '서명 하시겠습니까?';
  140. if(jQuery('#p_issue_gb').val() == '00' && sheet2.GetTotalRows() != 0 ){
  141. alert("인지세 발급 구분이 미발행일시 등록 된 인지세가 없어야 합니다. 삭제하여 주십시오.");
  142. return;
  143. }else{
  144. if(<%=warrCount.size() %>!=<%=warrList.size() %>){
  145. alert("해당 보증서의 진행 상태가 모두 발급 완료 상태일때 서명을 진행 하실수 있습니다.");
  146. return;
  147. }
  148. if(!stampDutyRowCheck()){
  149. return;
  150. }
  151. if( !stampDutyCheck() ) {
  152. return;
  153. }
  154. if(!promiseRowCheck()){
  155. return;
  156. }
  157. if(!promiseCheck()){
  158. return;
  159. }
  160. if(jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() == 0){
  161. alert("등록 된 인지세가 없습니다.");
  162. return;
  163. }else if( jQuery('#p_issue_gb').val() != '00' && sheet2.GetTotalRows() != 0 ){
  164. var ordAmt = parseInt(jQuery('#ord_amt').val().replace(/,/gi,""));
  165. var stampDutyTax = sheet2.GetCellValue(sheet2.LastRow(), "STAMP_DUTY_TAX");
  166. if( ordAmt <= 10000000 ){
  167. if( stampDutyTax != 0 ) {
  168. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 이하 : 0원\n\n서명 하시겠습니까?';
  169. }
  170. }else if( ordAmt > 10000000 && ordAmt <= 30000000 ) {
  171. if( stampDutyTax != 20000 ) {
  172. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1천만원 초과 ~ 3천만원이하 : 2만원\n\n서명 하시겠습니까?';
  173. }
  174. }else if( ordAmt > 30000000 && ordAmt <= 50000000 ) {
  175. if( stampDutyTax != 40000 ) {
  176. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n3천만원 초과 ~ 5천만원이하 : 4만원\n\n서명 하시겠습니까?';
  177. }
  178. }else if( ordAmt > 50000000 && ordAmt <= 100000000 ) {
  179. if( stampDutyTax != 70000 ) {
  180. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n5천만원 초과 ~ 1억원이하 : 7만원\n\n서명 하시겠습니까?';
  181. }
  182. }else if( ordAmt > 100000000 && ordAmt <= 1000000000 ) {
  183. if( stampDutyTax != 150000 ) {
  184. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n1억원 초과 ~ 10억원이하 : 15만원\n\n서명 하시겠습니까?';
  185. }
  186. }else if( ordAmt > 1000000000 ) {
  187. if( stampDutyTax != 350000 ) {
  188. stampMsg = '계약금액에 따른 인지세가 틀립니다.\n\n10억원 초과 : 35만원\n\n서명 하시겠습니까?';
  189. }
  190. }
  191. }
  192. }
  193. if (confirm(stampMsg)){
  194. SignData();
  195. }
  196. });
  197. //계약 내역 팝업
  198. jQuery("#btnItem").click(function() {
  199. var win_id = "ItemPop";
  200. var link = "/cont/purchase/ItemPopup.screen";
  201. link += "?pop_win_id="+win_id+"&PUR_CONT_MOD_ID="+$("#PUR_CONT_MOD_ID").val()+"&PUR_CONT_ID="+$("#PUR_CONT_ID").val()+"&editYN=N";
  202. fLayerPop(win_id, link, 950,500, '','', 'NO');
  203. });
  204. jQuery("#btnEditCall").click(function() {
  205. <%if(warrList.size() > 0) {%>
  206. if(<%=warrCount.size() %>==<%=warrList.size() %>){
  207. alert("모든 보증서가 발급 완료 상태일때는 수정 요청을 하실수 없습니다.");
  208. return;
  209. }
  210. <% } %>
  211. if (confirm("수정 요청 하시겠습니까?")){
  212. var win_id = "editcall_pop";
  213. var link = "/portal/cont/EditCallReasonPurPopup.screen";
  214. link += "?pop_win_id="+win_id+"&PUR_CONT_MOD_ID="+$("#PUR_CONT_MOD_ID").val();
  215. fLayerPop(win_id, link, 600,180, '','', 'NO');
  216. }
  217. });
  218. }
  219. //자동로그인 기능
  220. function f_gologin(login_id,login_pw){
  221. var f = document.form1;
  222. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  223. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  224. return;
  225. }
  226. f.login_id.value = login_id;
  227. f.login_pw.value = login_pw;
  228. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  229. alert("Log-in is being processed.");
  230. };
  231. }
  232. function goListProc(){
  233. var f = document.form1;
  234. f.fevent.value ="";
  235. <%if (params.get("p_cont_status").equals("50")){%>
  236. f.action = "/portal/cont/PurContResultList.screen";
  237. <%}else{%>
  238. f.action = "/portal/cont/PurContList.screen";
  239. <%}%>
  240. f.target = "_self";
  241. f.submit();
  242. }
  243. function doResult(resultObj) {
  244. try {
  245. if( resultObj.getRequestEvent() == "SIGN_OK") {
  246. if( resultObj.getSuccess() ) {
  247. alert("서명이 정상적으로 처리 되었습니다.")
  248. goListProc();
  249. } else {
  250. dlgErrorMsg(resultObj);
  251. }
  252. }
  253. if( resultObj.getRequestEvent() == "EDIT_CALL") {
  254. if( resultObj.getSuccess() ) {
  255. alert("수정 요청이 처리 되었습니다.");
  256. goListProc();
  257. }
  258. else {
  259. dlgErrorMsg(resultObj);
  260. }
  261. }
  262. }
  263. catch(errorObject) {
  264. showErrorDlg("doResult()", errorObject);
  265. }
  266. }
  267. //수정요청 팝업 종료후 액션
  268. function EditCallReasonClose(returnValue){
  269. if(returnValue == null){
  270. fLayerPopClose('editcall_pop');
  271. }else{
  272. if(returnValue[0] == 0){
  273. fLayerPopClose('editcall_pop');
  274. goListProc();
  275. }
  276. }
  277. }
  278. //첨부파일
  279. function doAttachFileDiv(obj) {
  280. if(obj==''){
  281. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  282. }
  283. else if(obj != ''){
  284. viewFileListNew('PUR_CONT_MOD_ID', obj.value, document.getElementById("attach_file_view"), "N", "cont/purchase/<%=ContInfo.get("PUR_CONT_MOD_ID")%>");
  285. }
  286. }
  287. /**
  288. * 첨부파일 예약 함수
  289. */
  290. function fileDown(file_id){
  291. var url="/common/file/FileDownloadServlet";
  292. url += "?file_id=" + file_id;
  293. 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")
  294. }
  295. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  296. var editFile = "";
  297. if(obj==''){
  298. alert("After you have saved, you can attach a file.");
  299. }
  300. else if(obj != ''){
  301. //if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="Y";}
  302. if((fObj.guarStatus.value == "02") || (fObj.guarStatus.value == "04")){editFile="Y";}else{editFile="N";}
  303. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "contPurWarrPopup");
  304. }
  305. }
  306. //보증정보팝업 호출
  307. function popContWarr(wG, wSeq, wCauseCd) {
  308. var win_id = "contPurWarrPopup";
  309. var param = "";
  310. var param = "?purContModId=" + jQuery("#PUR_CONT_MOD_ID").val();
  311. var param = param + "&warrGubun=" + wG;
  312. var param = param + "&warrSeq=" + wSeq;
  313. var param = param + "&causeCode=" + wCauseCd;
  314. var param = param + "&wonWarr=" + jQuery("#WON_WARR").val();
  315. var param = param + "&viewDiv=CONT";
  316. var param = param + "&pop_win_id=" + win_id;
  317. var url = "/portal/guar/contPurWarrPopup.screen"+param;
  318. fLayerPop(win_id, url, 560, 350, '','', 'YES');
  319. }
  320. //보증정보팝업 종료후 액션
  321. function popContWarrClose(returnValue){
  322. if(returnValue == null){
  323. fLayerPopClose('contPurWarrPopup');
  324. }else{
  325. fLayerPopClose('contPurWarrPopup');
  326. location.reload();
  327. }
  328. }
  329. //미연동 계약서 팝업 호출
  330. function popPricesys() {
  331. var win_id = "PurPricesysPopup";
  332. var param = "";
  333. var param = "?purContModId=" + jQuery("#PUR_CONT_MOD_ID").val();
  334. //var param = param + "&viewDiv=CONT";
  335. var param = param + "&pop_win_id=" + win_id;
  336. var param = param + "&fevent=FORM_SELECT";
  337. var url = "/portal/cont/PurPricesysPopup.screen"+param;
  338. fLayerPop(win_id, url, 1000, 270, '','', 'YES');
  339. }
  340. //미연동 계약서 팝업 종료후 액션
  341. function popPricesysClose(returnValue){
  342. if(returnValue == null){
  343. fLayerPopClose('PurPricesysPopup');
  344. }else{
  345. fLayerPopClose('PurPricesysPopup');
  346. location.reload();
  347. }
  348. }
  349. function stampDutyCheck(){
  350. for(i=1; i <= sheet2.RowCount(); i++){
  351. if(sheet2.GetCellValue(i, "STATUS")!="D"){
  352. if(sheet2.GetCellValue(i, "STAMP_DUTY_NO")==""){
  353. alert("인지세 "+i+"행의 고유식별번호가 없습니다.");
  354. return false;
  355. }
  356. if(sheet2.GetCellValue(i, "STAMP_DUTY_TAX")=="" || sheet2.GetCellValue(i, "STAMP_DUTY_TAX")<=0){
  357. alert("인지세 "+i+"행의 인지세가 없거나 인지세가 0보다 작거나 같습니다.\n인지세는 0보다 커야합니다.");
  358. return false;
  359. }
  360. if(sheet2.GetCellValue(i, "STAMP_DUTY_DATE")==""){
  361. alert("인지세 "+i+"행의 발행일자가 없습니다.");
  362. return false;
  363. }
  364. if(sheet2.GetCellValue(i, "FILE_ID")==""){
  365. alert("인지세 "+i+"행의 인지세사본이 없습니다.");
  366. return false;
  367. }
  368. }
  369. }
  370. return true;
  371. }
  372. function promiseCheck(){
  373. for(i=1; i <= sheet3.RowCount(); i++){
  374. var sText = sheet3.GetComboInfo(i, "PROMISE_DOC_TYPE_GB", "Text");
  375. var sCode = sheet3.GetComboInfo(i, "PROMISE_DOC_TYPE_GB", "Code");
  376. var arrText = sText.split("|");
  377. var arrCode = sCode.split("|");
  378. if(sheet3.GetCellValue(i, "STATUS")!="D"){
  379. if(sheet3.GetCellValue(i, "FILE_ID")==""){
  380. for(j=0; j<arrCode.length; j++){
  381. if(sheet3.GetCellValue(i, "PROMISE_DOC_TYPE_GB")==arrCode[j]){
  382. alert(i+"행의 "+arrText[j]+" 사본이 없습니다.");
  383. break;
  384. }
  385. }
  386. //alert(i+"행의 "+sheet3.GetCellValue(i, "PROMISE_DOC_TYPE_GB")+" 사본이 없습니다.");
  387. return false;
  388. }
  389. }
  390. }
  391. return true;
  392. }
  393. </SCRIPT>
  394. <modular:search id="form1">
  395. <modular:key id="fevent" />
  396. </modular:search>
  397. <form id="form1" name="form1" method="post" modular:type="search">
  398. <INPUT type="hidden" name="fevent" id="fevent" value="<%= params.get("fevent") %>">
  399. <INPUT type="hidden" name="acct_id" value="<%= params.get("acct_id") %>">
  400. <!-- 검색 조건 시작 -->
  401. <INPUT type="hidden" name="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
  402. <INPUT type="hidden" name="p_cont_status" value="<%=params.get("p_cont_status")%>">
  403. <INPUT type="hidden" name="ContFromDt" value="<%=params.get("ContFromDt")%>">
  404. <INPUT type="hidden" name="ContToDt" value="<%=params.get("ContToDt")%>">
  405. <INPUT type="hidden" name="p_build_nm" value="<%= params.get("p_build_nm") %>">
  406. <!-- 검색 조건끝 -->
  407. <INPUT type="hidden" name="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
  408. <INPUT type="hidden" name="PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>">
  409. <INPUT type="hidden" name="STATUS_CD" value="<%=ContInfo.get("STATUS_CD")%>">
  410. <INPUT type="hidden" name="PUR_CONT_ID" value="<%=ContInfo.get("PUR_CONT_ID")%>">
  411. <INPUT type="hidden" name="DEMANDED_ID" value="<%=ContInfo.get("DEMANDED_ID")%>">
  412. <INPUT type="hidden" name="O_CORP_ID" value="<%=ContInfo.get("O_CORP_ID")%>">
  413. <INPUT type="hidden" name="C_VENDCD" value="<%=ContInfo.get("C_VENDCD")%>">
  414. <!-- 계약서PDF정보 START-->
  415. <INPUT type="hidden" name="TEMPLATE_CD" value="<%=ContInfo.get("TEMPLATE_CD") %>">
  416. <INPUT type="hidden" name="CON_DOC_NO" value="<%=ContInfo.get("CON_DOC_NO") %>">
  417. <INPUT type="hidden" name="MOD_NO" value="<%=ContInfo.get("MOD_NO") %>">
  418. <INPUT type="hidden" name="PDF_FILE_CNT" value="<%=template.size()%>">
  419. <INPUT type="hidden" name="TRUE_RANDOM" value="<%=ContInfo.get("TRUE_RANDOM") %>">
  420. <!-- 계약서PDF정보 END-->
  421. <!--서명 데이터 정보 START-->
  422. <INPUT type='hidden' name="CONT_HASH" value="<%=ContInfo.get("CONT_HASH") %>">
  423. <INPUT type='hidden' name="CONT_SIGNDATA" value="">
  424. <INPUT type='hidden' name="CONT_SIGNDN" value="">
  425. <INPUT type='hidden' name="signeddata" value="">
  426. <%-- <INPUT type="hidden" id="stamp_duty_issue_gb" name="stamp_duty_issue_gb" value="<%=ContInfo.get("STAMP_DUTY_ISSUE_GB") %>"> --%>
  427. <INPUT type="hidden" id="STAMP_DUTY_ID" name="STAMP_DUTY_ID" value="<%=ContInfo.get("STAMP_DUTY_ID") %>">
  428. <INPUT type="hidden" name="WON_WARR" value="<%=params.get("WON_WARR") %>">
  429. <!-- 제목 및 버튼 -->
  430. <table width="100%">
  431. <colgroup>
  432. <col width="500" />
  433. <col width="*" />
  434. </colgroup>
  435. <tr>
  436. <th>
  437. <div align="left" id="title">
  438. <ul>
  439. <li>계약 정보(구매)</li>
  440. </ul>
  441. </div>
  442. </th>
  443. <td align="right">
  444. <%
  445. if(ContInfo.get("STATUS_CD").equals("20")){
  446. %>
  447. <span class="btnSearch center" id="btnSignOk"><a href="javascript:void(0);">서명</a></span>
  448. <span class="btnSearch center" id="btnEditCall"><a href="javascript:void(0);">수정요청</a></span>
  449. <%
  450. }
  451. %>
  452. <span class="btnSearch center" id="btnItem"><a href="javascript:void(0);">계약상품내역</a></span>
  453. <span class="btnSearch center" id="btnList"><a href="javascript:goListProc();">목록</a></span>
  454. </td>
  455. </tr>
  456. </table>
  457. <!-- 계약 정보 : 시작 -->
  458. <div class="application-info magT10">
  459. <div class="application-sub-title">
  460. <span class="title">기본정보</span>
  461. </div>
  462. <div class="application-location">
  463. </div>
  464. </div>
  465. <TABLE class="form-table">
  466. <colgroup>
  467. <col width="130px" />
  468. <col width="23%"/>
  469. <col width="130px" />
  470. <col width="23%"/>
  471. <col width="130px" />
  472. <col width="23%"/>
  473. </colgroup>
  474. <TR height="25">
  475. <TH style="text-align: left;">현장명</TH>
  476. <TD colspan="3"><%=ContInfo.get("DEPT_NAME")%></TD>
  477. <TH style="text-align: left;">전자계약 여부</TH>
  478. <TD><%=ContInfo.get("ELEC_CON_YN").equals("Y") ? "온라인" : "오프라인" %></TD>
  479. </TR>
  480. <TR height="25">
  481. <TH style="text-align: left;">계약명</TH>
  482. <TD colspan="5"><%=ContInfo.get("CST_DOC_NAME")%></TD>
  483. </TR>
  484. </TABLE>
  485. <%@ include file="/jsp/ko_KR/supplier/portal/cont/stampDuty.jsp" %>
  486. <%@ include file="/jsp/ko_KR/supplier/portal/cont/priceSys.jsp" %>
  487. <%@ include file="/jsp/ko_KR/supplier/portal/cont/promiseDocList.jsp" %>
  488. <div class="application-info magT10">
  489. <div class="application-sub-title">
  490. <span class="title">당사정보(원사업자) </span>
  491. </div>
  492. <div class="application-location">
  493. <%if (!ContInfo.get("O_SIGN_DATE").equals("")){%>
  494. 서명일시 : <%= ContInfo.get("O_SIGN_DATE") %>
  495. <%}%>
  496. </div>
  497. </div>
  498. <TABLE class="form-table">
  499. <colgroup>
  500. <col width="130px" />
  501. <col width="23%"/>
  502. <col width="130px" />
  503. <col width="23%"/>
  504. <col width="130px" />
  505. <col width="23%"/>
  506. </colgroup>
  507. <TR height="25">
  508. <TH style="text-align: left;">업체명</TH>
  509. <TD><%=ContInfo.get("O_MEMBER_NAME")%></TD>
  510. <TH style="text-align: left;">주소</TH>
  511. <TD><%=ContInfo.get("O_ADDRESS")%></TD>
  512. <TH style="text-align: left;">대표자명</TH>
  513. <TD><%=ContInfo.get("O_BOSS_NAME")%></TD>
  514. </TR>
  515. <TR height="25">
  516. <TH style="text-align: left;">담당부서</TH>
  517. <TD><%=ContInfo.get("O_DIVISION")%></TD>
  518. <TH style="text-align: left;">담당자명</TH>
  519. <TD>
  520. <%=ContInfo.get("O_USER_NAME")%>
  521. </TD>
  522. <TH style="text-align: left;">직급</TH>
  523. <TD><%=ContInfo.get("O_POSITION")%></TD>
  524. </TR>
  525. <TR height="25">
  526. <TH style="text-align: left;">담당자 연락처</TH>
  527. <TD><%=ContInfo.get("O_TEL_NUM")%></TD>
  528. <TH style="text-align: left;">담당자 HP</TH>
  529. <TD><%=ContInfo.get("O_HP")%></TD>
  530. <TH style="text-align: left;">담당자 EMAIL</TH>
  531. <TD><%=ContInfo.get("O_EMAIL")%></TD>
  532. </TR>
  533. <!-- 계약정보 : 종료 -->
  534. </table>
  535. <div class="application-info magT10">
  536. <div class="application-sub-title">
  537. <span class="title">계약업체정보(수급 사업자) </span>
  538. </div>
  539. <div class="application-location">
  540. <%if (!ContInfo.get("C_SIGN_DATE").equals("")){%>
  541. 서명일시 : <%= ContInfo.get("C_SIGN_DATE") %>
  542. <%}%>
  543. </div>
  544. </div>
  545. <TABLE class="form-table">
  546. <colgroup>
  547. <col width="130px" />
  548. <col width="23%"/>
  549. <col width="130px" />
  550. <col width="23%"/>
  551. <col width="130px" />
  552. <col width="23%"/>
  553. </colgroup>
  554. <TR height="25">
  555. <TH style="text-align: left;">업체명</TH>
  556. <TD><%=ContInfo.get("C_MEMBER_NAME")%></TD>
  557. <TH style="text-align: left;">주소</TH>
  558. <TD><%=ContInfo.get("C_ADDRESS")%></TD>
  559. <TH style="text-align: left;">대표자명</TH>
  560. <TD><%=ContInfo.get("C_BOSS_NAME")%></TD>
  561. </TR>
  562. <TR height="25">
  563. <TH style="text-align: left;">담당부서</TH>
  564. <TD><%=ContInfo.get("C_DIVISION")%></TD>
  565. <TH style="text-align: left;">담당자명</TH>
  566. <TD><%=ContInfo.get("C_USER_NAME")%></TD>
  567. <TH style="text-align: left;">직급</TH>
  568. <TD><%=ContInfo.get("C_POSITION")%></TD>
  569. </TR>
  570. <TR height="25">
  571. <TH style="text-align: left;">담당자 연락처</TH>
  572. <TD><%=ContInfo.get("C_TEL_NUM")%></TD>
  573. <TH style="text-align: left;">담당자 HP</TH>
  574. <TD><%=ContInfo.get("C_HP")%></TD>
  575. <TH style="text-align: left;">담당자 EMAIL</TH>
  576. <TD><%=ContInfo.get("C_EMAIL") %></TD>
  577. </TR>
  578. <!-- 계약정보 : 종료 -->
  579. </table>
  580. <%if ((!ContInfo.get("MODI_REQ_REASON").equals("")) && (ContInfo.get("STATUS_CD").equals("40"))){ //수정 요청 내용이 있을경우 %>
  581. <div class="application-info magT15">
  582. <div class="application-sub-title">
  583. <span class="title">수정요청 사유</span>
  584. </div>
  585. </div>
  586. <TABLE class="form-table">
  587. <colgroup>
  588. <col width="130px" />
  589. <col width="*" />
  590. </colgroup>
  591. <TR height="25">
  592. <TH style="text-align: left;">사유</TH>
  593. <TD><%=ContInfo.get("MODI_REQ_REASON") %></TD>
  594. </TR>
  595. <TR height="25">
  596. <TH style="text-align: left;">요청일</TH>
  597. <TD><%=ContInfo.get("MODI_REQ_DT") %></TD>
  598. </TR>
  599. </TABLE>
  600. <% } %>
  601. <div class="application-info magT10">
  602. <div class="application-sub-title">
  603. <span class="title">계약정보</span>
  604. </div>
  605. <div class="application-location">
  606. </div>
  607. </div>
  608. <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid black;padding-top:5px">
  609. <tr>
  610. <td align="center" bgcolor="#efefef">
  611. <table width="770px" border="0" cellspacing="0" cellpadding="0">
  612. <tr>
  613. <td style="text-align:center;">
  614. <%
  615. for(int i = 0 ; i < template.size(); i ++){
  616. %>
  617. <input type="hidden" name="template_seq" value="<%=template.getRow(i).get("SEQ")%>">
  618. <input type="hidden" name="template_name" value="<%=template.getRow(i).get("TEMPLATE_NAME")%>">
  619. <input type="hidden" name="template_style" value="<%=template.getRow(i).get("TEMPLATE_STYLE")%>">
  620. <input type="hidden" name="option_yn" value="<%=template.getRow(i).get("OPTION_YN")%>">
  621. <% if(i==0){ %>
  622. <span class="tab_on" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  623. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  624. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  625. </span>&nbsp;
  626. <% }else{ %>
  627. <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  628. <%if(template.getRow(i).get("OPTION_YN").equals("A")){%>
  629. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  630. <%}else if(template.getRow(i).get("OPTION_YN").equals("Y")){ %>
  631. <input type="checkbox" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="Y" <%if(template.getRow(i).get("CHECK_YN").equals("Y")){%>checked="checked"<%}%>>
  632. <%} %>
  633. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  634. </span>
  635. <% } %>
  636. <%} %>
  637. </td>
  638. </tr>
  639. </table>
  640. <div id="__html" style="width:770px;border:1px solid black;padding:10px 10px 10px 10px;background-color:#FFFFFF;text-align:left;" >
  641. <%
  642. for(int i = 0 ; i < template.size(); i ++){
  643. String template_html = ClobUtils.getClob((Clob)template.getRow(i).getObject("TEMPLATE_HTML"));
  644. String divHidden = template.getRow(i).get("SEQ").equals("0")?"":"none";
  645. %>
  646. <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")%>">
  647. <%= template_html%>
  648. </div>
  649. <%} %>
  650. </div>
  651. <br>
  652. </td>
  653. </tr>
  654. </table>
  655. <div class="application-info magT15">
  656. <div class="application-sub-title">
  657. <span class="title">계약서류</span>
  658. </div>
  659. </div>
  660. <TABLE class="form-table">
  661. <colgroup>
  662. <col width="130px" />
  663. <col width="*" />
  664. </colgroup>
  665. <TR height="25">
  666. <TH style="text-align: left;">자동생성</TH>
  667. <TD>
  668. <table width="100%">
  669. <colgroup>
  670. <col width="100%" />
  671. </colgroup>
  672. <TR height="25">
  673. <TD>
  674. <div id="auto_attach_file_view" class="attach_file_view">
  675. <ul>
  676. <%
  677. for(int i=0;i<autofile_list.size();i++){
  678. %>
  679. <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>
  680. <%
  681. }
  682. %>
  683. </ul>
  684. </div>
  685. </TD>
  686. </TR>
  687. </TABLE>
  688. </TD>
  689. </TR>
  690. <TR height="25">
  691. <TH style="text-align: left;"> 직접첨부</TH>
  692. <TD>
  693. <table width="100%">
  694. <colgroup>
  695. <col width="50%" />
  696. <col width="50%" />
  697. </colgroup>
  698. <tr>
  699. <td>
  700. <div id="attach_file_view" class="attach_file_view">
  701. <!-- 첨부 파일 화면에 바로보일때 사용 -->
  702. <%=FileManager.getFileListForDiv("PUR_CONT_MOD_ID", ContInfo.get("PUR_CONT_MOD_ID")) %>
  703. </div>
  704. </td>
  705. <td>
  706. <!-- IMG id='search_spot_button' onClick="doAttachFileDiv(document.form1.PUR_CONT_MOD_ID,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;' -->
  707. </td>
  708. </tr>
  709. </table>
  710. </TD>
  711. </TR>
  712. </TABLE>
  713. <%
  714. /*
  715. 보증 목록을 include 시킴 (2014-10-17) 김명호
  716. */
  717. if(warrList.size() > 0) {
  718. %>
  719. <%@ include file="/jsp/ko_KR/supplier/portal/common/guar/guarPurList.jsp" %>
  720. <%
  721. }
  722. %>
  723. </form>
  724. <!-- =========사인 요청 상태이후 (20)에는 입력을 받지 못하게 처리 (김명호 : 2014-07-21)============== -->
  725. <script>
  726. //window.addEventListener("onload",convertHtml)
  727. window.onload = function() {
  728. convertHtml();
  729. };
  730. function convertHtml(){
  731. if(!document.getElementById("__html"))return;
  732. var elements = document.getElementById("__html").getElementsByTagName("input");
  733. for(var i = 0; i < elements.length; i++){
  734. var element = elements[i];
  735. setDisabled(element);
  736. }
  737. var elements = document.getElementById("__html").getElementsByTagName("textarea");
  738. for(var i = 0; i < elements.length; i++){
  739. var element = elements[i];
  740. element.className = "input_readonly";
  741. element.readOnly = true;
  742. }
  743. var elements = document.getElementById("__html").getElementsByTagName("img");
  744. for(var i = 0; i < elements.length; i++){
  745. var element = elements[i];
  746. element.style.display="none";
  747. }
  748. /*협력사에서 안보이는 부분숨기는 처리*/
  749. var elements = getElementsByClass("cl_no_view");
  750. for(var i = 0; i < elements.length; i++){
  751. var element = elements[i];
  752. element.style.display="none";
  753. }
  754. }
  755. </script>
  756. <!-- ------------------서명 요청 처리 로직-------- -->
  757. <SCRIPT LANGUAGE="JavaScript">
  758. function SignData()
  759. {
  760. debugger;
  761. var VendorCd = document.form1.C_VENDCD.value;
  762. var sOrgnData = $("#CONT_HASH").val();
  763. var sColumDelimiter = "┃";
  764. sOrgnData= sOrgnData +sColumDelimiter
  765. + VendorCd +sColumDelimiter;
  766. unisign.SignDataNVerifyVID( sOrgnData, null, VendorCd, function( resultObject ) {
  767. if( !resultObject || resultObject.resultCode != 0 ){
  768. if( resultObject.resultCode == '14208'){
  769. alert("주민번호/사업자번호를 확인할 수 없는 인증서입니다.");
  770. } else if( resultObject.resultCode == '999'){
  771. alert("사용자 DN 선택이 취소 되었습니다.");
  772. } else {
  773. alert( resultObject.resultMessage);
  774. }
  775. return ;
  776. }
  777. var signeddata = resultObject.signedData;
  778. var userdn = resultObject.certAttrs.subjectName;
  779. alert("신원확인 성공");
  780. $("#CONT_SIGNDATA").val(signeddata);
  781. $("#CONT_SIGNDN").val(userdn);
  782. var f = document.form1;
  783. jQuery("#fevent").val("SIGN_OK");
  784. submitXmlRequest("/portal/cont/PurContDetail_form.screen", "SIGN_OK", f);
  785. });
  786. }
  787. //-->
  788. </SCRIPT>
  789. <FRAME src="" name="main" width="1" height="1"></FRAMESET>
  790. <!-- 전자인증 모듈 //-->
  791. <br/><br/>
  792. <script>
  793. </script>
  794. <iframe id="fileDown" name="fileDown" style="display:none"></iframe>
  795. <!-- 전자인증 모듈 설정 //-->
  796. <link rel="stylesheet" type="text/css" href="/CrossCert/CC_WSTD_home/unisignweb/rsrc/css/certcommon.css?v=1" />
  797. <script type="text/javascript" src="/CrossCert/CC_WSTD_home/unisignweb/js/unisignwebclient.js?v=1"></script>
  798. <script type="text/javascript" src="/CrossCert/UniSignWeb_Multi_Init_Nim.js?v=1"></script>
  799. <!-- 전자인증 모듈 설정 //-->