ContResult.jsp 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. <%--
  2. - Author(s) : Kim Myung HO
  3. - Date : 2014.08.11
  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="java.net.URLEncoder"%>
  17. <%@ page import="kr.co.udapsoft.ebid.buyer.common.file.FileManager"%>
  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. // RowSet CorpRowSet = storage.getRowSet("CorpRowSet");
  25. ValueObject ContInfo = storage.getValueObject("ContInfo");
  26. /*계약서식 정보 */
  27. RowSet template = storage.getRowSet("template");
  28. /*계약서식 FILE */
  29. RowSet autofile_list = storage.getRowSet("AUTOFILE_LIST");
  30. /*보증 정보 LIst */
  31. RowSet warrList = storage.getRowSet("warrList");
  32. /*계약 구매 내역 목록*/
  33. RowSet itemList = storage.getRowSet("itemList");
  34. /*인지세 구분*/
  35. RowSet stampList = storage.getRowSet("stampRowSet");
  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. var sheet1;
  43. var sheet1Row;
  44. var sheet1PageNo = 1;
  45. var pageLastRowIndex = 1;
  46. var validationResult = false;
  47. var filterShow = false;
  48. var payCallNum = 3; //대금계획에서 화면 이동 정의
  49. function _onReady(){
  50. /* STAMP_DUTY, PROMISE_DOC 인클루드 페이지 기능 */
  51. gridInit2(sheet2);
  52. gridInit3(sheet3);
  53. doSearchStamp();
  54. doSearchPromise();
  55. if(!(jQuery("#STATUS_CD").val() == '20' || jQuery("#STATUS_CD").val() == '30' || jQuery("#STATUS_CD").val() == '50')){
  56. jQuery("#p_issue_gb").attr("disabled",false);
  57. jQuery("#p_promise_gb").attr("disabled",false);
  58. if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""){
  59. //jQuery("#btnAdd").hide();
  60. jQuery("#btnSaveStamp").hide();
  61. }else{
  62. //jQuery("#btnAdd").show();
  63. jQuery("#btnSaveStamp").show();
  64. }
  65. if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""){
  66. //jQuery("#btnPromiseAdd").hide();
  67. jQuery("#btnSavePromise").hide();
  68. }else{
  69. //jQuery("#btnPromiseAdd").show();
  70. jQuery("#btnSavePromise").show();
  71. }
  72. }else{
  73. jQuery("#p_issue_gb").attr("disabled",true);
  74. jQuery("#p_promise_gb").attr("disabled",true);
  75. if(jQuery("#p_issue_gb").val()=="00"||jQuery("#p_issue_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
  76. //jQuery("#btnAdd").hide();
  77. jQuery("#btnSaveStamp").hide();
  78. }else{
  79. //jQuery("#btnAdd").show();
  80. jQuery("#btnSaveStamp").show();
  81. }
  82. if(jQuery("#p_promise_gb").val()=="00"||jQuery("#p_promise_gb").val()==""||jQuery("#STATUS_CD").val() == '50'){
  83. //jQuery("#btnPromiseAdd").hide();
  84. jQuery("#btnSavePromise").hide();
  85. }else{
  86. //jQuery("#btnPromiseAdd").show();
  87. jQuery("#btnSavePromise").show();
  88. }
  89. }
  90. /**
  91. * Application Initialize
  92. */
  93. checkAuthority();
  94. jQuery("#btnChange").click(function() {
  95. if (confirm("변경 계약을 진행 하시겠습니까?")){
  96. var f = document.form1;
  97. jQuery("#fevent").val("CHANGE_CONT");
  98. submitXmlRequest("/cont/purchase/ContResult_form.screen", "CHANGE_CONT", f);
  99. }
  100. });
  101. jQuery("#btnBack").click(function() {
  102. if (confirm("ERP계약을 삭제하고, 계약현황으로 돌아갑니다. \n계속 하시겠습니까?")){
  103. var f = document.form1;
  104. jQuery("#fevent").val("CONT_BACK");
  105. submitXmlRequest("/cont/purchase/ContResult_form.screen", "CONT_BACK", f);
  106. }
  107. });
  108. jQuery("#btnSavePayItem").click(function() {
  109. //분개유형 DEFAULT(-선택-)일 경우 팝업 출력(2020.12.28)
  110. if(jQuery("#acct_gb").val() == "0"){
  111. alert("분개유형을 선택해 주시기 바랍니다.");
  112. return;
  113. }else if (confirm("분개유형을 저장 하시겠습니까?")){
  114. var f = document.form1;
  115. jQuery("#fevent").val("SAVE_PAYITEM");
  116. submitXmlRequest("/cont/purchase/ContResult_form.screen", "SAVE_PAYITEM", f);
  117. }
  118. });
  119. //2017.03.08 업체담당자 HP, email 수정
  120. jQuery("#btnChgSuppInfo").click(function() {
  121. if (confirm("담당자 정보를 수정 하시겠습니까?")){
  122. var f = document.form1;
  123. jQuery("#fevent").val("CHG_SUPP_INFO");
  124. submitXmlRequest("/cont/purchase/ContResult_form.screen", "CHG_SUPP_INFO", f);
  125. }
  126. });
  127. jQuery("#btnPaySave").click(function() {
  128. //대금 계획 체크
  129. if(!paySaveChk()){
  130. return;
  131. }
  132. if (confirm("대금계획을 저장 하시겠습니까?")){
  133. payPlanSave(); //대금 계획 저장
  134. }
  135. });
  136. //계약 내역 팝업
  137. jQuery("#btnItem").click(function() {
  138. var win_id = "ItemPop";
  139. var editYN = "N";
  140. if(document.getElementById("STATUS_CD").value=="10"){editYN="Y";}
  141. var link = "/cont/purchase/ItemPopup.screen";
  142. link += "?pop_win_id="+win_id+"&PUR_CONT_MOD_ID="+$("#PUR_CONT_MOD_ID").val()+"&PUR_CONT_ID="+$("#PUR_CONT_ID").val()+"&digit="+$("#sosuNum").val()+"&curr_std_nm="+encodeURI(encodeURIComponent($("#CURR_STD_NM").val()),"UTF-8")+"&editYN="+ editYN;
  143. fLayerPop(win_id, link, 950,500, '','', 'NO');
  144. });
  145. //고용보험 신청서
  146. jQuery("#btnInsur").click(function(){
  147. var f = document.form1;
  148. jQuery("#fevent").val("SAVE_INSUR");
  149. submitXmlRequest("/cont/purchase/ContResult_form.screen", "SAVE_INSUR", f);
  150. });
  151. $("#corp_add").click(function(){
  152. var win_id = "corp";
  153. var outitem = "";
  154. var link = "/common/corp/SuppChoicePop.screen";
  155. link += "?pop_win_id="+win_id+"&BID_KIND=P";
  156. fLayerPop(win_id, link, 800,400, '','', 'NO');
  157. });
  158. $.test = function(resultVal){
  159. $("#IN_CORP_ID").val(resultVal[0][0]);
  160. $("#IN_CORP_NAME").html(resultVal[2][0]);
  161. setTimeout(function(){ fLayerPopClose('corp');},100);
  162. }
  163. $("#btnAdd").click(function() {
  164. if($(".addPay").css("display") == "none"){
  165. $(".addPay").show();
  166. $("#btnAddIn").html("계약추가취소");
  167. } else {
  168. $(".addPay").hide();
  169. $("#btnAddIn").html("계약추가");
  170. }
  171. });
  172. $("#btnAddPay").click(function() {
  173. if (confirm("계약을 추가 하시겠습니까?")){
  174. if($("#IN_ORD_DOC_NO").val()==""){
  175. alert("신규계약번호를 입력 해주세요.");
  176. return;
  177. }
  178. if($("#IN_CORP_ID").val()==""){
  179. alert("업체를 추가 해주세요.");
  180. return;
  181. }
  182. var f = document.form1;
  183. jQuery("#fevent").val("ADD_PAY");
  184. submitXmlRequest("/cont/purchase/ContResult_form.screen", "ADD_PAY", f);
  185. }
  186. });
  187. }
  188. //자동로그인 기능
  189. function f_gologin(login_id,login_pw){
  190. var f = document.form1;
  191. if('<%= user.get("ACCT_TYPE_CODE")%>' != "ADMIN"){
  192. dlgAlert("User who logged in as administrator only can do automatic log-in.");
  193. return;
  194. }
  195. f.login_id.value = login_id;
  196. f.login_pw.value = login_pw;
  197. if( !submitXmlRequest("/sign_on_check", "", document.form1) ) {
  198. alert("Log-in is being processed.");
  199. };
  200. }
  201. function goListProc(){
  202. var f = document.form1;
  203. f.fevent.value ="";
  204. f.action = "/cont/purchase/ContResultList.screen";
  205. f.target = "_self";
  206. f.submit();
  207. }
  208. function doResult(resultObj) {
  209. try {
  210. if( resultObj.getRequestEvent() == "CHANGE_CONT") {
  211. if( resultObj.getSuccess() ) {
  212. alert("변경 계약이 처리 되었습니다.\n\n변경계약 목록에서 계약서를 작성 해 주시기 바랍니다.");
  213. //location.href="/cont/purchase/ContTargetList.screen?ChgCont=Y"; 2019.06.18 수정 ContChgRcvList
  214. location.href="/cont/purchase/ContChgRcvList.screen";
  215. } else {
  216. dlgErrorMsg(resultObj);
  217. }
  218. }
  219. if( resultObj.getRequestEvent() == "SAVE_PAYITEM") {
  220. if( resultObj.getSuccess() ) {
  221. alert("분개유형이 저장 되었습니다.");
  222. location.reload();
  223. } else {
  224. dlgErrorMsg(resultObj);
  225. }
  226. }
  227. if( resultObj.getRequestEvent() == "CHG_SUPP_INFO") {
  228. if( resultObj.getSuccess() ) {
  229. alert("담당자 정보가 수정 되었습니다.");
  230. location.reload();
  231. } else {
  232. dlgErrorMsg(resultObj);
  233. }
  234. }
  235. if( resultObj.getRequestEvent() == "ADD_PAY") {
  236. if( resultObj.getSuccess() ) {
  237. alert("계약이 추가 되었습니다.");
  238. location.reload();
  239. } else {
  240. dlgErrorMsg(resultObj);
  241. }
  242. }
  243. if( resultObj.getRequestEvent() == "SAVE_INSUR"){ //고용보험 신청
  244. if(resultObj.getSuccess()){
  245. var f = document.form1;
  246. f.fevent.value ="";
  247. f.action = "/cont/purchase/ContResultInsur.screen";
  248. f.target = "_self";
  249. f.submit();
  250. } else {
  251. dlgErrorMsg(resultObj);
  252. }
  253. }
  254. if( resultObj.getRequestEvent() == "CONT_BACK") {
  255. if( resultObj.getSuccess() ) {
  256. alert("계약이 취소되었습니다.");
  257. location.href="/cont/purchase/ContIngList.screen";
  258. } else {
  259. dlgErrorMsg(resultObj);
  260. }
  261. }
  262. if( resultObj.getRequestEvent() == "TRANS_PAY_YN") {
  263. if( resultObj.getSuccess() ) {
  264. alert("대금여부가 변경 되었습니다.");
  265. location.reload();
  266. } else {
  267. dlgErrorMsg(resultObj);
  268. }
  269. }
  270. document.form1.isSubmit = false;
  271. }
  272. catch(errorObject) {
  273. showErrorDlg("doResult()", errorObject);
  274. }
  275. }
  276. //첨부파일
  277. function doAttachFileDiv(obj) {
  278. if(obj==''){
  279. alert("저장을 한 후 파일을 첨부할 수 있습니다.");
  280. }
  281. else if(obj != ''){
  282. viewFileListNew('PUR_CONT_MOD_ID', obj.value, document.getElementById("attach_file_view"), "Y", "cont/purchase/<%=ContInfo.get("PUR_CONT_MOD_ID")%>");
  283. }
  284. }
  285. /**
  286. * 첨부파일 예약 함수
  287. */
  288. function fileDown(file_id){
  289. var url="/common/file/FileDownloadServlet";
  290. url += "?file_id=" + file_id;
  291. 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")
  292. }
  293. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  294. var editFile = "";
  295. if(obj==''){
  296. alert("After you have saved, you can attach a file.");
  297. }
  298. else if(obj != ''){
  299. if(fObj.guarStatus.value != "02"){editFile="N";}else{editFile="Y";}
  300. if('<%= user.get("ACCT_TYPE_CODE")%>' == "ADMIN"){
  301. editFile = "Y";
  302. }
  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 + "&viewDiv=CONT";
  315. var param = param + "&pop_win_id=" + win_id;
  316. var param = param + "&sModule=EB";
  317. var url = "/portal/guar/contPurWarrPopup.screen"+param;
  318. fLayerPop(win_id, url, 560,350, '','', 'NO');
  319. }
  320. //보증정보팝업 종료후 액션
  321. function popContWarrClose(returnValue){
  322. if(returnValue == null)
  323. setTimeout(function(){fLayerPopClose('contPurWarrPopup');},100);
  324. if(returnValue[0] == 0){
  325. setTimeout(function(){fLayerPopClose('contPurWarrPopup');},100);
  326. location.reload();
  327. }
  328. }
  329. /*대금 계획 때문에 필요담당자 호출*/
  330. var pCallPop = "";
  331. function SearchUser(pGuBun){
  332. pCallPop = pGuBun;
  333. var win_id = "_searchUserPopup";
  334. var link = "/lib/dlgSearchUserPop.screen";
  335. link += "?pop_win_id="+win_id;
  336. link += "&deptNameYn=N";
  337. fLayerPop(win_id, link, 700,400, '', '', 'NO');
  338. }
  339. /*담당자 호출 Return Value 처리*/
  340. function SearchUserClose(result){
  341. if(result != null){
  342. if(pCallPop == "Sheet"){
  343. sheet1.SetCellValue(clickRow, "VP_CHK_EMPNO", result[9]); //밴더프린트 담당자 아이디
  344. sheet1.SetCellValue(clickRow, "VP_CHK_EMPNM", result[1]); //밴더프린트 담당자명
  345. }
  346. if(pCallPop == "Sheet2"){
  347. sheet1.SetCellValue(clickRow, "PLAN_APPR_CHK_EMPNO", result[9]); //설계평가 담당자 아이디
  348. sheet1.SetCellValue(clickRow, "PLAN_APPR_CHK_EMPNM", result[1]); //설계평가 담당자명
  349. }
  350. }
  351. fLayerPopClose('_searchUserPopup');
  352. }
  353. </SCRIPT>
  354. <modular:search id="form1">
  355. <modular:key id="fevent" />
  356. </modular:search>
  357. <form id="form1" name="form1" method="post" modular:type="search">
  358. <INPUT type="hidden" name="fevent" id="fevent" value="<%= params.get("fevent") %>">
  359. <INPUT type="hidden" name="acct_id" value="<%= params.get("acct_id") %>">
  360. <!-- 검색 조건 시작-->
  361. <INPUT type="hidden" name="p_dept_cd" value="<%= params.get("p_dept_cd") %>">
  362. <INPUT type="hidden" name="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
  363. <INPUT type="hidden" name="p_dealer_nm" value="<%= params.get("p_dealer_nm") %>">
  364. <INPUT type="hidden" name="p_cont_status" value="<%= params.get("p_cont_status") %>">
  365. <INPUT type="hidden" name="ContFromDt" value="<%= params.get("ContFromDt") %>">
  366. <INPUT type="hidden" name="ContToDt" value="<%= params.get("ContToDt") %>">
  367. <INPUT type="hidden" name="p_build_nm" value="<%= params.get("p_build_nm") %>">
  368. <INPUT type="hidden" name="p_cont_no" value="<%= params.get("p_cont_no") %>">
  369. <INPUT type="hidden" name="p_mr_no" value="<%= params.get("p_mr_no") %>">
  370. <INPUT type="hidden" name="p_auto_search" id="p_auto_search" value="<%= params.get("p_auto_search") %>">
  371. <!-- 검색 조건 끝-->
  372. <INPUT type="hidden" name="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
  373. <INPUT type="hidden" name="PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>">
  374. <INPUT type="hidden" name="PUR_CONT_ID" value="<%=ContInfo.get("PUR_CONT_ID")%>">
  375. <INPUT type="hidden" name="O_CORP_ID" value="<%=ContInfo.get("O_CORP_ID")%>">
  376. <INPUT type="hidden" name="C_CORP_ID" value="<%=ContInfo.get("C_CORP_ID")%>">
  377. <INPUT type="hidden" name="STATUS_CD" value="<%=ContInfo.get("STATUS_CD")%>">
  378. <INPUT type="hidden" name="O_VENDCD" value="<%=ContInfo.get("O_VENDCD")%>">
  379. <INPUT type='hidden' name="CURR_STD_NM" value="<%= ContInfo.get("CURR_STD_NM") %>">
  380. <!-- 계약서PDF정보 START-->
  381. <INPUT type="hidden" name="TEMPLATE_CD" value="<%=ContInfo.get("TEMPLATE_CD") %>">
  382. <INPUT type="hidden" name="CON_DOC_NO" value="<%=ContInfo.get("CON_DOC_NO") %>">
  383. <INPUT type="hidden" name="MOD_NO" value="<%=ContInfo.get("MOD_NO") %>">
  384. <INPUT type="hidden" name="PDF_FILE_CNT" value="<%=template.size()%>">
  385. <INPUT type="hidden" name="TRUE_RANDOM" value="<%=ContInfo.get("TRUE_RANDOM") %>">
  386. <!-- 계약서PDF정보 END-->
  387. <!--서명 데이터 정보 START-->
  388. <INPUT type='hidden' name="CONT_HASH" value="<%=ContInfo.get("CONT_HASH") %>">
  389. <INPUT type='hidden' name="CONT_SIGNDATA" value="">
  390. <INPUT type='hidden' name="CONT_SIGNDN" value="">
  391. <INPUT type='hidden' name="signeddata" value="">
  392. <INPUT type="hidden" name="O_REG_NO" value="<%=ContInfo.get("O_REG_NO") %>">
  393. <INPUT type="hidden" name="DEMANDED_ID" value="<%=ContInfo.get("DEMANDED_ID") %>">
  394. <!-- 제목 및 버튼 -->
  395. <table width="100%">
  396. <colgroup>
  397. <col width="500" />
  398. <col width="*" />
  399. </colgroup>
  400. <tr>
  401. <th>
  402. <div align="left" id="title">
  403. <ul>
  404. <li>구매_계약 상세</li>
  405. </ul>
  406. </div>
  407. </th>
  408. <td align="right">
  409. <%if(ContInfo.get("DIV_PO_YN").equals("Y")&&user.get("ACCT_TYPE_CODE").equals("ADMIN")){%>
  410. <span class="btnSearch center" id="btnAdd"><a id="btnAddIn" href="javascript:void(0);">계약추가</a></span>
  411. <%} %>
  412. <%-- <% 2018.12.27 더존에서 변경계약시작 && !ContInfo.get("DIV_PO_YN").equals("Y") ContInfo.get("DIV_PO_YN").equals("Y") &&
  413. if (ContInfo.get("CON_CLS_YN").equals("9") && ContInfo.get("MOD_NO").equals(ContInfo.get("MAX_MOD_NO")) && "0".equals(ContInfo.get("CHG_CNT")) ){
  414. %>
  415. <span class="btnSearch center" id="btnChange"><a href="javascript:void(0);">변경계약작성</a></span> && "0".equals(ContInfo.get("CHG_CNT") --%>
  416. <%
  417. if (ContInfo.get("CON_CLS_YN").equals("9") && ContInfo.get("MOD_NO").equals(ContInfo.get("MAX_MOD_NO")) ){
  418. if ( user.get("right_name").equals("PURCHASE") || user.get("right_name").equals("ADMIN NEW") ){%>
  419. <%if(!ContInfo.get("DIV_PO_YN").equals("Y")){%>
  420. <span class="btnSearch center" id="btnChange"><a href="javascript:void(0);">변경계약작성</a></span>
  421. <%} %>
  422. <span class="btnSearch center" id="btnBack"><a href="javascript:void(0);">계약취소</a></span>
  423. <%}
  424. } %>
  425. <span class="btnSearch center" id="btnItem"><a href="javascript:void(0);">계약상품내역</a></span>
  426. <span class="btnSearch center" id="btnList"><a href="javascript:goListProc();">목록</a></span>
  427. <span class="btnSearch center" id="btnInsur"><a href="javascript:void(0);">고용보험 신청서</a></span>
  428. </td>
  429. </tr>
  430. </table>
  431. <div class="addPay" style="display: none;">
  432. <div class="application-info magT10">
  433. <div class="application-sub-title">
  434. <span class="title">추가계약정보</span>
  435. </div>
  436. <div class="application-location" style="padding-bottom:5px;">
  437. <span align="right" class="btnSearch center" id="btnAddPay"><a align="right" href="javascript:void(0);">생성</a></span>
  438. </div>
  439. </div>
  440. <TABLE class="form-table">
  441. <colgroup>
  442. <col width="120px" />
  443. <col width="24%"/>
  444. <col width="120px" />
  445. <col/>
  446. </colgroup>
  447. <TR height="25">
  448. <TH>신규계약번호</TH>
  449. <TD><input type="text" id="IN_ORD_DOC_NO" value="<%=ContInfo.get("ORD_DOC_NO")%>" style="width:250px;"></TD>
  450. <TH>업체명</TH>
  451. <TD><span id="IN_CORP_NAME" style="display:inline-block; width: 40%;"></span><span class="btnSearch center" id="corp_add"><a href="javascript:void(0);">업체추가</a></span></TD>
  452. </TR>
  453. </TABLE>
  454. <input type="hidden" id="IN_CORP_ID" value=""/>
  455. <input type="hidden" id="IN_PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>"/>
  456. <input type="hidden" id="IN_DEPT_CD" value="<%=ContInfo.get("DEPT_CD")%>"/>
  457. </div>
  458. <%
  459. /*
  460. 계약 정보를 한페이지로 만들어서 include 시킴 (2014-08-14) 김명호
  461. */
  462. String isViewWrite = "V";
  463. String finalYn = "Y";
  464. %>
  465. <%@ include file="/jsp/ko_KR/buyer/cont/purchase/ContInfo.jsp" %>
  466. <div class="application-info magT10">
  467. <div class="application-sub-title">
  468. <span class="title">계약정보</span>
  469. </div>
  470. <div style="text-align:center;">
  471. </div>
  472. </div>
  473. <%if (template.size() == 0) { %>
  474. <input name="prepay_amt" id="prepay_amt" type="hidden" value="<%=ContInfo.get("prepay_amt")%>" />
  475. <input name="mid_amt" id="mid_amt" type="hidden" value="<%=ContInfo.get("mid_amt")%>" />
  476. <input name="rmdr_amt" id="rmdr_amt" type="hidden" value="<%=ContInfo.get("rmdr_amt")%>" />
  477. <TABLE class="form-table">
  478. <colgroup>
  479. <col width="120px" />
  480. <col width="24%"/>
  481. <col width="120px" />
  482. <col width="24%"/>
  483. <col width="120px" />
  484. <col/>
  485. </colgroup>
  486. <TR height="25">
  487. <TH>계약일자</TH>
  488. <TD>
  489. <%= InputText.get("ord_con_date", ContInfo.get("ord_con_date"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  490. <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ord_con_date');" -->
  491. </TD>
  492. <TH>납품기한</TH>
  493. <TD>
  494. <%= InputText.get("ORD_START_DATE", ContInfo.get("ORD_START_DATE"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  495. <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ORD_START_DATE');" -->
  496. ~
  497. <%= InputText.get("ORD_END_DATE", ContInfo.get("ORD_END_DATE"), 10, 50, "hangule,center, desc=계약일자,ReadOnly") %>
  498. <!-- IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('ORD_END_DATE');" -->
  499. </TD>
  500. <TH>통화구분</TH>
  501. <TD><%= InputText.get("CURRENCY_GB", ContInfo.get("CURRENCY_GB"), 96, 20, "required,desc=대표자명,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  502. </TR>
  503. <TR height="25">
  504. <TH>계약금액</TH>
  505. <TD><%= InputText.get("ORD_AMT", Formatter.formatCurrency(ContInfo.get("ORD_AMT")), 96, 100, "desc=계약금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","currinc") %></TD>
  506. <TH>공급가</TH>
  507. <TD><%= InputText.get("ORD_SUPPLY_AMT", Formatter.formatCurrency(ContInfo.get("ORD_SUPPLY_AMT")), 96, 100, "desc=공급가,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right","number") %></TD>
  508. <TH>부가세</TH>
  509. <TD><%= InputText.get("ORD_SURTAX_AMT", Formatter.formatCurrency(ContInfo.get("ORD_SURTAX_AMT")), 96, 100, "required,desc=부가세,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","number") %></TD>
  510. </TR>
  511. <TR height="25">
  512. <TH>계약이행 보증율</TH>
  513. <TD><%= InputText.get("CON_GUAR_AMT_RATE", ContInfo.get("CON_GUAR_AMT_RATE"), 91, 100, "required,desc=계약이행보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %>&nbsp;%</TD>
  514. <TH>보증금액</TH>
  515. <TD><%= InputText.get("CON_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("CON_GUAR_AMT")), 96, 100, "required,desc=계약이행보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
  516. <TH>보증기간</TH>
  517. <TD><%= InputText.get("CON_GUAR_TERM", ContInfo.get("CON_GUAR_TERM"), 96, 100, "required,desc=계약이행보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  518. </TR>
  519. <TR height="25">
  520. <TH>선급금 보증율</TH>
  521. <TD><%= InputText.get("PREPAY_GUAR_AMT_RATE", ContInfo.get("PREPAY_GUAR_AMT_RATE"), 91, 100, "required,desc=선급금 보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %>&nbsp;%</TD>
  522. <TH>보증금액</TH>
  523. <TD><%= InputText.get("PREPAY_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("PREPAY_GUAR_AMT")), 96, 100, "required,desc=선급금보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
  524. <TH>선급금액</TH>
  525. <TD><%= InputText.get("PREPAY_AMT", Formatter.formatCurrency(ContInfo.get("PREPAY_AMT")), 96, 100, "required,desc=선급금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right","number") %></TD>
  526. </TR>
  527. <TR height="25">
  528. <TH>하자보수 보증율</TH>
  529. <TD><%= InputText.get("DEF_GUAR_AMT_RATE", ContInfo.get("DEF_GUAR_AMT_RATE"), 91, 100, "required,desc=하자보수보증율,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1,right") %>&nbsp;%</TD>
  530. <TH>보증금액</TH>
  531. <TD><%= InputText.get("DEF_GUAR_AMT", Formatter.formatCurrency(ContInfo.get("DEF_GUAR_AMT")), 96, 100, "required,desc=하자보수보증금액,persize,readOnly,class=input_blank,readOnly=white,number,tabIndex=-1,right") %></TD>
  532. <TH>보증기간</TH>
  533. <TD><%= InputText.get("DEF_GUAR_TERMS", ContInfo.get("DEF_GUAR_TERMS"), 96, 100, "required,desc=하자보수보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  534. </TR>
  535. <TR height="25">
  536. <TH>인도조건</TH>
  537. <TD>
  538. <INPUT type='hidden' name="LEAD_COND_GB" value="<%=ContInfo.get("LEAD_COND_GB") %>">
  539. <%= InputText.get("LEAD_COND_GB_NM", ContInfo.get("LEAD_COND_GB_NM"), 96, 100, "required,desc=인도조건,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  540. <TH>납품장소</TH>
  541. <TD><%= InputText.get("LEAD_PLACE", ContInfo.get("LEAD_PLACE"), 96, 100, "required,desc=납품장소,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  542. <TH>지체상금</TH>
  543. <TD><%= InputText.get("DEL_RATE_GB", ContInfo.get("DEL_RATE_GB"), 96, 100, "required,desc=하자보수보증기간,persize,readOnly,class=input_blank,readOnly=white,string,tabIndex=-1") %></TD>
  544. </TR>
  545. <TR height="25">
  546. <TH>특이사항</TH>
  547. <TD colspan="5">
  548. <textarea name="con_display_txt" class="input_n" style="width:100%" rows="6" hname="기타사항" ><%=ContInfo.get("con_display_txt") %></textarea>
  549. </TD>
  550. </TR>
  551. <!-- 계약정보 : 종료 -->
  552. </table>
  553. <%
  554. if(itemList.size()>0){
  555. %>
  556. <div class="application-info magT10">
  557. <div class="application-sub-title">
  558. <span class="title">상품정보</span>
  559. </div>
  560. <div style="text-align:center;">
  561. </div>
  562. </div>
  563. <TABLE class="list-form-table">
  564. <colgroup><col width="60"><col width="*"><col width="15%"><col width="15%"><col width="15%"><col width="15%"><%if(ContInfo.get("DIV_PO_YN").equals("N")){%><col width="*"><%} %></colgroup>
  565. <tr>
  566. <th>NO</th>
  567. <th>품명</th>
  568. <th>규격</th>
  569. <th>단위</th>
  570. <th>수량(톤)</th>
  571. <th>단가</th>
  572. <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
  573. <th>금액(원)</th>
  574. <%} %>
  575. </tr>
  576. <%
  577. double sum_qty=0;
  578. double sum_amt=0;
  579. for(int i=0;i<itemList.size();i++){
  580. sum_qty = sum_qty + Double.parseDouble(itemList.getRow(i).get("ITEM_QTY"));
  581. sum_amt = sum_amt + Double.parseDouble(itemList.getRow(i).get("SUM_AMT"));
  582. %>
  583. <tr>
  584. <td style="text-align:right"><%=i+1%></td>
  585. <td><%=itemList.getRow(i).get("ITEM_NAME")%></td>
  586. <td><%=itemList.getRow(i).get("ITEM_SPEC")%></td>
  587. <td><%=itemList.getRow(i).get("ITEM_UNIT_NM")%></td>
  588. <td style="text-align:right;"><%= ContInfo.get("DIV_PO_YN").equals("N") ? Formatter2.currency(itemList.getRow(i).get("ITEM_QTY")):"1"%>&nbsp;</td>
  589. <td style="text-align:right;"><%=Formatter2.currency(Double.parseDouble(itemList.getRow(i).get("ITEM_PRICE")), 0)%>&nbsp;</td>
  590. <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
  591. <td style="text-align:right;"><%=Formatter2.currency(Double.parseDouble(itemList.getRow(i).get("SUM_AMT")), 0)%>&nbsp;</td>
  592. <%} %>
  593. </tr>
  594. <%
  595. }
  596. %>
  597. <%if(ContInfo.get("DIV_PO_YN").equals("N")){%>
  598. <tr>
  599. <th colspan="4" style="text-align:center"><b>합&nbsp;계</b></th>
  600. <td style="text-align:right;"><%=Formatter2.currency(sum_qty, 0)%>&nbsp;</td>
  601. <td colspan="2" style="text-align:right;"><%=Formatter2.currency(sum_amt, 0)%>&nbsp;</td>
  602. </tr>
  603. <%} %>
  604. </table>
  605. <%
  606. }
  607. %>
  608. <%}else{%>
  609. <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border:1px solid black;padding-top:5px">
  610. <tr>
  611. <td align="center" bgcolor="#efefef">
  612. <table width="770px" border="0" cellspacing="0" cellpadding="0">
  613. <tr>
  614. <td align="center">
  615. <%
  616. for(int i = 0 ; i < template.size(); i ++){
  617. %>
  618. <input type="hidden" name="template_seq" value="<%=template.getRow(i).get("SEQ")%>">
  619. <input type="hidden" name="template_name" value="<%=template.getRow(i).get("TEMPLATE_NAME")%>">
  620. <input type="hidden" name="template_style" value="<%=template.getRow(i).get("TEMPLATE_STYLE")%>">
  621. <input type="hidden" name="option_yn" value="<%=template.getRow(i).get("OPTION_YN")%>">
  622. <% if(i==0){%>
  623. <span class="tab_on" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  624. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  625. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  626. </span>&nbsp;
  627. <% }else{ %>
  628. <%if((template.getRow(i).get("OPTION_YN").equals("A")) ||(template.getRow(i).get("CHECK_YN").equals("Y"))){ //정상적인 계약서 파일만 보이게 한다. 진행중일경우 체크 박스로 추가 가능%>
  629. <span class="tab_off" id="tab_<%=template.getRow(i).get("SEQ")%>" onClick="tabView(<%=template.getRow(i).get("SEQ")%>)">
  630. <input type="hidden" name="check_yn_<%=template.getRow(i).get("SEQ")%>" value="A">
  631. <%=template.getRow(i).get("TEMPLATE_NAME")%>
  632. </span>
  633. <%} %>
  634. <% } %>
  635. <%} %>
  636. </td>
  637. </tr>
  638. </table>
  639. <div id="__html" style="width:770px;border:1px solid black;padding:10px 10px 10px 10px;background-color:#FFFFFF;text-align:left;" >
  640. <%
  641. for(int i = 0 ; i < template.size(); i ++){
  642. String template_html = ClobUtils.getClob((Clob)template.getRow(i).getObject("TEMPLATE_HTML"));
  643. String divHidden = template.getRow(i).get("SEQ").equals("0")?"":"none";
  644. %>
  645. <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")%>">
  646. <%= template_html%>
  647. </div>
  648. <%} %>
  649. </div>
  650. <br />
  651. </td>
  652. </tr>
  653. </table>
  654. <%} %>
  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="120" />
  663. <col width="*" />
  664. </colgroup>
  665. <TR height="25">
  666. <TH>자동생성</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>직접첨부</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. <%if(warrList.size()>0){%>
  714. <%
  715. /*
  716. 보증 목록을 include 시킴 (2014-10-16) 김명호
  717. */
  718. %>
  719. <%@ include file="/jsp/ko_KR/buyer/cont/purchase/guarList.jsp" %>
  720. <%
  721. }
  722. %>
  723. </form>
  724. <!-- =========사인 요청 상태이후 (20)에는 입력을 받지 못하게 처리 (김명호 : 2014-07-21)============== -->
  725. <script>
  726. //window.addEventListener("onload",convertHtml)
  727. <%
  728. if((ContInfo.get("STATUS_CD").equals("20")) || (ContInfo.get("STATUS_CD").equals("30")) || (ContInfo.get("STATUS_CD").equals("50"))){
  729. %>
  730. //window.onload=convertHtml();
  731. window.onload = function() {
  732. convertHtml();
  733. };
  734. <%
  735. }
  736. %>
  737. function convertHtml(){
  738. if(!document.getElementById("__html"))return;
  739. var elements = document.getElementById("__html").getElementsByTagName("input");
  740. for(var i = 0; i < elements.length; i++){
  741. var element = elements[i];
  742. setDisabled(element);
  743. }
  744. var elements = document.getElementById("__html").getElementsByTagName("textarea");
  745. for(var i = 0; i < elements.length; i++){
  746. var element = elements[i];
  747. element.className = "input_readonly";
  748. element.readOnly = true;
  749. }
  750. var elements = document.getElementById("__html").getElementsByTagName("img");
  751. for(var i = 0; i < elements.length; i++){
  752. var element = elements[i];
  753. element.style.display="none";
  754. }
  755. /*협력사에서 안보이는 부분숨기는 처리*/
  756. var elements = getElementsByClass("cl_no_view");
  757. for(var i = 0; i < elements.length; i++){
  758. var element = elements[i];
  759. element.style.display="none";
  760. }
  761. }
  762. </script>