SuppContDetail.jsp 34 KB

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