PurContDetail.jsp 28 KB

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