SubconPayGuarDetail.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588
  1. <%--
  2. - Author(s) : mklee
  3. - Date : 2017.07.06
  4. - Description: 외주_하도급대금지급보증서
  5. --%>
  6. <%@ page contentType="text/html; charset=utf-8" %>
  7. <%@ page import="java.text.SimpleDateFormat" %>
  8. <%@ page import="java.util.Date" %>
  9. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  10. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  11. <%@ page import="kr.co.udapsoft.common.code.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  15. <%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
  16. <%@ include file="/jsp/work/taglib.jsp" %>
  17. <%@ page import="kr.co.hsnc.common.config.WAFConfig %>
  18. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  19. <%
  20. String guarUrl = WAFConfig.get("waf.guar.url");
  21. ctx.init(request, response);
  22. HandlerStorage storage = ctx.getHandlerStorage();
  23. ValueObject params = storage.getParams();
  24. ValueObject user = storage.getUser();
  25. ValueObject cont = storage.getValueObject("Cont");
  26. ValueObject guar = storage.getValueObject("guar");
  27. %>
  28. <SCRIPT language="JavaScript">
  29. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  30. /*예약함수*/
  31. var sheet1 = new ibsheetObject();
  32. var sheet2 = new ibsheetObject();
  33. var sheet1Row;
  34. var sheet1PageNo = 1;
  35. var sheet2Row;
  36. var sheet2PageNo = 1;
  37. var pageLastRowIndex = 1;
  38. var validationResult = false;
  39. var filterShow = false;
  40. function _onReady(){
  41. /**
  42. * IBSheet object initialize
  43. */
  44. gridInit(sheet1);
  45. gridInit(sheet2);
  46. /**
  47. * Application Initialize
  48. */
  49. jQuery("#btn_list").click(function() {
  50. $("#fevent").val("");
  51. $("#form1").attr("action", "/cont/purchase/SubconPayGuarList.screen");
  52. $("#form1").attr("target", "_self");
  53. $("#form1").attr("method", "post");
  54. $("#form1").submit();
  55. });
  56. jQuery("#btn_save").click(function() {
  57. var f = document.form1;
  58. jQuery("#fevent").val("GUAR_SAVE");
  59. submitXmlRequest("/cont/purchase/SubconPayGuarDetail_form.screen", "GUAR_SAVE", f, "SUCCESS");
  60. });
  61. jQuery("#CON_AMT,#ADDPREPAYAMT,#FILESIZE").blur(function () {
  62. doCalculation();
  63. });
  64. jQuery("#START_WORK_DATE, #END_WORK_DATE").change(function(){
  65. doCalculation();
  66. });
  67. <% if (!guar.get("WARR_STATUS").equals("완료")) {%>
  68. doCalculation();
  69. <%}else {%>
  70. var s_date = new Date(jQuery("#START_WORK_DATE").val().substring(0,4),jQuery("#START_WORK_DATE").val().substring(5,7) - 1,jQuery("#START_WORK_DATE").val().substring(8,10) ) ;//공사기간
  71. var end_date = new Date(jQuery("#END_WORK_DATE").val().substring(0,4),jQuery("#END_WORK_DATE").val().substring(5,7) -1,jQuery("#END_WORK_DATE").val().substring(8,10)) ;
  72. var diff = end_date - s_date;
  73. var curDay = 24*60*60*1000 ;
  74. var curMonth = curDay * 30;
  75. var curYear = curMonth * 12;
  76. var duration = parseInt(diff/curDay) + Number(1);
  77. var cal_date = Number(duration) / 30;
  78. jQuery("#dur_date").val("(공사기간 " + duration + "일)");
  79. <%}%>
  80. doSearchSheet1();
  81. }
  82. function doCalculation(){
  83. var conamt = jQuery("#CON_AMT").val().replace(/(\,|\:)/g,""); //계약금액
  84. var preamt = jQuery("#ADDPREPAYAMT").val().replace(/(\,|\:)/g,""); //계약상선급금
  85. var paymon = jQuery("#FILESIZE").val().replace(/(\,|\:)/g,""); //기성지급주기
  86. var warramt = Number(conamt) - Number(preamt) ; //보증금액
  87. var s_date = new Date(jQuery("#START_WORK_DATE").val().substring(0,4),jQuery("#START_WORK_DATE").val().substring(5,7) - 1,jQuery("#START_WORK_DATE").val().substring(8,10) ) ;//공사기간
  88. var end_date = new Date(jQuery("#END_WORK_DATE").val().substring(0,4),jQuery("#END_WORK_DATE").val().substring(5,7) -1,jQuery("#END_WORK_DATE").val().substring(8,10)) ;
  89. var diff = end_date - s_date;
  90. var curDay = 24*60*60*1000 ;
  91. var curMonth = curDay * 30;
  92. var curYear = curMonth * 12;
  93. var duration = parseInt(diff/curDay) + Number(1);
  94. var cal_date = Number(duration) / 30;
  95. jQuery("#dur_date").val("(공사기간 " + duration + "일)");
  96. if (Number(duration) < 121){ //공사기간 4개월이하. 기성지급주기 2개월 이하 : 보증금액=하도급계약금액 - 계약상 선급금
  97. warramt = Number(conamt) - Number(preamt)
  98. }else{
  99. if (Number(paymon) < 3) { //기성지급주기 2개월 이하 : ((계약금액-선급금)/(공사일수/30)) * 4
  100. warramt = Math.floor(Number(warramt)/Number(cal_date)*4);
  101. }else{ //기성지급주기 2개월 초과 : ((계약금액-선급금)/(공사일수/30)) * 기성지급주기 * 2
  102. warramt = Math.floor((Number(warramt)/Number(cal_date)) * Number(paymon) * 2);
  103. }
  104. }
  105. warramt = Math.floor(warramt / 10 ) * 10;
  106. jQuery("#WARR_WAMT").val(warramt);
  107. jQuery("#WARR_WAMT").each(function(index){
  108. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  109. });
  110. }
  111. function doSearchSheet1(){
  112. $("#fevent").val("GUAR_SHEET");
  113. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/SubconPayGuarDetail_sheet.screen";
  114. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  115. }
  116. function doSearchSheet2(){
  117. $("#fevent").val("PAYMENT_SHEET");
  118. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/SubconPayGuarDetail_sheet.screen";
  119. Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
  120. }
  121. function popContWarr(wG, wSeq, wCauseCd, wOnOff, wGStatus, wOffid, wConRefNo) {
  122. var win_id = "subconPayPurOffPopup";
  123. var param = "";
  124. var param = "?purContModId=" + jQuery("#PUR_CONT_MOD_ID").val();
  125. var param = param + "&warrGubun=" + wG;
  126. var param = param + "&warrSeq=" + wSeq;
  127. var param = param + "&causeCode=" + wCauseCd;
  128. var param = param + "&viewDiv=SUBCONPAY";
  129. var param = param + "&pop_win_id=" + win_id;
  130. var url = "";
  131. if (wOnOff == ""){
  132. alert("발급구분을 선택해 주세요.");return;
  133. }
  134. if(wOnOff=="N"){
  135. var param = param + "&fevent=WARR_OFF";
  136. url = "/portal/guar/subconPayPurOffPopup.screen"+param;
  137. fLayerPop(win_id, url, 560,500, '','', 'YES');
  138. }else if(wOnOff=="Y"){
  139. if((wGStatus=="08") || (wGStatus=="09")){
  140. var sGuarKind = wG; //보증서종류
  141. var sGuarSeq = wSeq; //일련번호
  142. var sGuarOnoffYn = wOnOff; //온오프여부
  143. var sGuarStatus = wGStatus; //보증진행상태
  144. var sChgNo = jQuery("#MOD_NO").val(); //계약차수
  145. var style = "";
  146. var src = "";
  147. var sGrtType = "006"; // 보증종목구분 : 지급
  148. //검토대기나 완료일경우
  149. if(sGuarOnoffYn == "Y" && sGuarStatus.length > 0 && (sGuarStatus == "08" || sGuarStatus == "09")){
  150. var sOffId = wOffid; // 수신기관 ID
  151. var conRefNo = wConRefNo; // 계약번호
  152. var sGrtSeq = wSeq; // 보증차수
  153. var sMsgFuncCode = "53"; // 문서기능
  154. var sModule = "EB"; // 모듈구분코드
  155. if(sChgNo == "")
  156. sChgNo = "00";
  157. else if(sChgNo.length == 1)
  158. sChgNo = "0" + sChgNo;
  159. if(sGrtSeq.length == 1)
  160. sGrtSeq = "0" + sGrtSeq;
  161. //parameter 확인 요함
  162. src = "<%=guarUrl%>/transure/view/KSCFCView.jsp?offID="+sOffId+"&conRefNo="+conRefNo+"&conSeqNo="+sChgNo+"&grtSeq="+sGrtSeq+"&grtType="+sGrtType+"&msgFuncCode="+sMsgFuncCode+"&module="+sModule;
  163. style = "width=720,height=800, loactionbar=visible, menubar=visible, scrollbars=no";
  164. }
  165. //alert(src);
  166. var id = "WARR";
  167. var clNew = window.open(src,id,style);
  168. if(clNew == null){
  169. alert(" ▒【보증신청】페이지는 팝업창으로 구성되어 있습니다. ▒\n\n\n'팝업이 차단되었습니다. 팝업 또는 추가 옵션을 보려면 여기를 클릭하십시오.' 라는\n\n 메세지가 보일경우에는 그 메세지를 클릭하셔서 '현재 사이트의 팝업을 항상 허용'이나\n\n'임시로 팝업허용'으로 설정해주시기 바랍니다.");
  170. }else{
  171. clNew.focus();
  172. }
  173. }else{ //온라인 처음 등록
  174. var param = param + "&fevent=WARR_ON";
  175. var param = param + "&PUR_CONT_ID=" + jQuery("#PUR_CONT_ID").val();
  176. var param = param + "&MOD_NO=" + jQuery("#MOD_NO").val();
  177. url = "/portal/guar/subconPayPurOnPopup.screen"+param;
  178. fLayerPop(win_id, url, 800,700, '','', 'YES');
  179. }
  180. }
  181. }
  182. //보증정보팝업 종료후 액션
  183. function popContWarrClose(returnValue){
  184. if(returnValue == null){
  185. fLayerPopClose('subconPayPurOffPopup');
  186. }else{
  187. if(returnValue[0] == 0){
  188. fLayerPopClose('subconPayPurOffPopup');
  189. var f = document.form1;
  190. f.isSubmit = false;
  191. $("#PUR_CONT_MOD_ID").val(returnValue[2]);
  192. reDisplay();
  193. }
  194. }
  195. }
  196. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  197. var editFile = "";
  198. if(obj==''){
  199. alert("After you have saved, you can attach a file.");
  200. }
  201. else if(obj != ''){
  202. if(fObj.guarStatus.value != "02"){editFile="Y";}else{editFile="Y";}
  203. if(No=="1"){
  204. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "subconPayPurOffPopup");
  205. }else{
  206. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar2, editFile, fileDir, "subconPayPurOffPopup");
  207. }
  208. }
  209. }
  210. /**
  211. * IBSheet object initialize
  212. */
  213. function gridInit(sheetName){
  214. var init_sheet = {};
  215. init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly};
  216. if(sheetName.id == "sheet1"){
  217. init_sheet.Cols = [
  218. {Header:'변경구분', Type:"Text", SaveName:"CAUSECODE_NM", Width:100, Align:"Left" , Edit:"false"},
  219. {Header:'증서번호', Type:"Text", SaveName:"WARR_WGNO", Width:150, Align:"Left" , Edit:"false"},
  220. {Header:'발급기관', Type:"Text", SaveName:"WARR_GOFFICE", Width:150, Align:"Left" , Edit:"false"},
  221. {Header:'보증금액', Type:"Text", SaveName:"WARR_WAMT", Width:100, Align:"right", Edit:"false"},
  222. {Header:'수수료', Type:"Text", SaveName:"WARR_COMMSN", Width:100, Align:"right", Edit:"false"},
  223. {Header:'보증기간', Type:"Text", SaveName:"WARR_START_END_DATE", Width:150, Align:"Center", Edit:"false"},
  224. {Header:'발급일', Type:"Text", SaveName:"PAPERDATE", Width:80, Align:"Center", Edit:"false"},
  225. {Header:'발급구분', Type:"Combo", SaveName:"GUAR_ONOFF_YN", Width:80, Align:"Center" , Edit:"true", ComboText:"선택|온라인|오프라인|비대상", ComboCode:"|Y|N|F"},
  226. {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS_NM", Width:80, Align:"center", Edit:"false"},
  227. {Header:'보증신청계약번호', Type:"Text", SaveName:"GRTREQNO", Width:100, Align:"Left", Edit:"false"},
  228. {Header:'PUR_CONT_MOD_ID', Type:"Text", SaveName:"PUR_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  229. {Header:'WARR_GUBUN', Type:"Text", SaveName:"WARR_GUBUN", Width:0, Align:"Center", Hidden:"True"},
  230. {Header:'WARR_SEQ', Type:"Text", SaveName:"WARR_SEQ", Width:0, Align:"Center", Hidden:"True"},
  231. {Header:'CAUSECODE', Type:"Text", SaveName:"CAUSECODE", Width:0, Align:"Center", Hidden:"True"},
  232. {Header:'보증등록', Type:"Image", SaveName:"BTN", Width:80, Align:"Center", Edit:"false", Cursor:"Pointer"},
  233. {Header:'비고', Type:"Text", SaveName:"WARR_GREM", Width:100, Align:"Left", Edit:"false"},
  234. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:50, Align:"Center", Hidden:"True"},
  235. {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS", Width:50, Align:"Center", Hidden:"True"},
  236. {Header:'수신기관', Type:"Text", SaveName:"WARR_GOFFICE_ID", Width:50, Align:"Center", Hidden:"True"},
  237. ];
  238. init_sheet.HeaderMode = {Sort:1};
  239. IBS_InitSheet(sheetName, init_sheet);
  240. sheetName.SetDataAutoTrim(0);
  241. sheetName.SetImageList(1,"/img/buyer/btn/btn_write.gif");
  242. sheetName.SetImageList(2,"/img/buyer/btn/error_detail_plus.gif");
  243. }else{
  244. init_sheet.Cols = [
  245. {Header:'상태|상태', Type:"Status", SaveName:"Status", Width:100, Align:"Left", Hidden:"True"},
  246. {Header:'현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:100, Align:"Left"},
  247. {Header:'계약번호|계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Hidden:"True"},
  248. {Header:'계약명|계약명', Type:"Text", SaveName:"BUILD_NAME", Width:110, Align:"Left"},
  249. {Header:'업체명|업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left"},
  250. {Header:'공사기간|공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:130, Align:"Left"},
  251. {Header:'통화구분|통화구분', Type:"Text", SaveName:"CURRENCY_GB", Width:55, Align:"Center"},
  252. {Header:'통화구분자리|통화구분자리', Type:"Int", SaveName:"CURRENCY_DIGIT", Width:100, Align:"Left", Hidden:"True"},
  253. {Header:'계약금액|계약금액', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"Right"},
  254. {Header:'계약금액|합계', Type:"Int", SaveName:"CON_AMT", Width:40, Align:"Right", Hidden:"True"},
  255. {Header:'계약상선급금|계약상선급금', Type:"Int", SaveName:"PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
  256. {Header:'선급금발생|선급금발생', Type:"Int", SaveName:"REQ_PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
  257. {Header:'선급금\n신청날짜|선급금\n신청날짜',Type:"Text", SaveName:"PREPAY_DATE", Width:65, Align:"Right"},
  258. {Header:'기성년월|기성년월', Type:"Text", SaveName:"ACMP_YYYYMM", Width:50, Align:"Right"},
  259. {Header:'지급\n차수|지급\n차수', Type:"Int", SaveName:"ACMP_NO", Width:40, Align:"Right"},
  260. {Header:'기성액|금회기성', Type:"Int", SaveName:"FUND_AMT", Width:80, Align:"Right"},
  261. {Header:'기성액|선급금공제', Type:"Int", SaveName:"PAY_DEDUCT_AMT", Width:80, Align:"Right"},
  262. {Header:'기성액|실지불액', Type:"Int", SaveName:"REQU_SUPPLY_AMT", Width:80, Align:"Right"},
  263. {Header:'기성액|잔여기성', Type:"Int", SaveName:"MOD_FUND_AMT", Width:80, Align:"Right"},
  264. {Header:'기성율\n(%)|기성율\n(%)', Type:"Float", SaveName:"FUND_RATE", Width:40, Align:"Right", Format:"##0.00"},
  265. {Header:'상태|상태', Type:"Text", SaveName:"STATUS_CD", Width:50, Align:"Center"},
  266. ];
  267. init_sheet.HeaderMode = {Sort:1};
  268. IBS_InitSheet(sheetName, init_sheet);
  269. sheetName.SetDataAutoTrim(0);
  270. sheetName.SetEditable(false);
  271. var info = [{StdCol:1, SumCols:"CON_AMT|FUND_AMT", ShowCumulate:0,Sort:0,CaptionCol:1}
  272. ,{StdCol:2, SumCols:"CON_AMT|FUND_AMT|PAY_DEDUCT_AMT|REQU_SUPPLY_AMT|FUND_RATE", ShowCumulate:0,Sort:0,CaptionCol:2}];
  273. sheetName.ShowSubSum(info);
  274. sheetName.SetActionMenu("ExcelDown");
  275. }
  276. setGridSize();
  277. }
  278. /**
  279. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  280. */
  281. function sheet1_OnSearchEnd(code, message) {
  282. var fevent = $("#fevent").val();
  283. if(code == 0) {
  284. if("GUAR_SHEET" == fevent){
  285. doSearchSheet2();
  286. }
  287. } else {
  288. //조회 에러 수행
  289. alert(message);
  290. }
  291. }
  292. /**
  293. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  294. */
  295. function sheet2_OnSearchEnd(code, message) {
  296. var fevent = $("#fevent").val();
  297. if(code == 0) {
  298. if ($("#WARR_WAMT").val() == ""){
  299. doCalculation();
  300. }
  301. } else {
  302. //조회 에러 수행
  303. alert(message);
  304. }
  305. }
  306. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  307. if ((sheet1.ColSaveName(Col) == "BTN")) {
  308. var comboValue = sheet1.GetCellValue(Row,"GUAR_ONOFF_YN");
  309. if(comboValue == "F" ){
  310. var Status = sheet1.GetCellValue(Row,"STATUS");
  311. if(Status=="R"){
  312. alert("변경된 데이터가 없습니다.");
  313. return;
  314. }
  315. var bigo = sheet1.GetCellValue(Row,"WARR_GREM");;
  316. if(bigo == "" || bigo == null){
  317. alert("비대상 사유를 비고란에 입력하세요");
  318. return;
  319. }
  320. if(!confirm("비대상 보증정보를 저장하시겠습니까?")) return;
  321. jQuery("#fevent").val("NOT_GUAR_SAVE");
  322. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/purchase/SubconPayGuarList_sheet.screen";
  323. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  324. }else{
  325. popContWarr(sheet1.GetCellValue(Row, "WARR_GUBUN"),sheet1.GetCellValue(Row, "WARR_SEQ"),sheet1.GetCellValue(Row, "CAUSECODE"),sheet1.GetCellValue(Row, "GUAR_ONOFF_YN"),sheet1.GetCellValue(Row, "GUAR_STATUS"),sheet1.GetCellValue(Row, "WARR_GOFFICE_ID"),sheet1.GetCellValue(Row, "GRTREQNO"))
  326. }
  327. }
  328. }
  329. /**
  330. * IBSheet size setting
  331. */
  332. function setGridSize() {
  333. sheet1.FitColWidth();
  334. sheet2.FitColWidth();
  335. }
  336. function doResult(resultObj) {
  337. try {
  338. if( resultObj.getRequestEvent() == "FORM_UPDATE") {
  339. if( resultObj.getSuccess() ) {
  340. alert("저장 되었습니다.");
  341. $("#btn_list").click();
  342. }
  343. else {
  344. dlgErrorMsg(resultObj);
  345. }
  346. }else if( resultObj.getRequestEvent() == "GUAR_SAVE" ) {
  347. if( resultObj.getSuccess() ) {
  348. document.form1.isSubmit = false;
  349. alert("저장되었습니다.");
  350. reDisplay();
  351. }else {
  352. dlgErrorMsg(resultObj);
  353. }
  354. }
  355. } catch(errorObject) {
  356. showErrorDlg("doResult()", errorObject);
  357. }
  358. }
  359. function sheet1_OnSmartResize(Width, Height) {
  360. setGridSize();
  361. autoResize();
  362. }
  363. function autoResize(){
  364. sheet1.SetSheetHeight(160);
  365. sheet2.SetSheetHeight(250);
  366. }
  367. function reDisplay() {
  368. jQuery("#fevent").val("UPDATE_DATA");
  369. jQuery("#form1").attr("action", "/cont/purchase/SubconPayGuarDetail.screen");
  370. jQuery("#form1").attr("target", "_self");
  371. jQuery("#form1").attr("method", "post");
  372. jQuery("#form1").submit();
  373. }
  374. function doSignFile(){
  375. var job_div = "O";
  376. var popUrl = "/payment/purchase/PayItemOutDashBoardPop.screen?job_div="+job_div+"&sModule=LM&purContId="+ jQuery("#PUR_CONT_ID").val()+"&job_auth=<%= user.get("RIGHT_NAME")%>";
  377. job_div = "O";
  378. var popOption = "width=800, height=600, resizable=no, scrollbars=yes, status=no;";
  379. window.open(popUrl,"",popOption);
  380. }
  381. </SCRIPT>
  382. <modular:search id="form1">
  383. <modular:key id="fevent" />
  384. </modular:search>
  385. <BODY onresize="autoResize()">
  386. <form id="form1" name="form1" method="post" modular:type="search">
  387. <INPUT type='hidden' name="fevent" id="fevent" value="">
  388. <!-- List Search -->
  389. <INPUT type='hidden' name="p_dept_cd" value="<%=params.get("p_dept_cd")%>">
  390. <INPUT type='hidden' name="p_dept_nm" value="<%=params.get("p_dept_nm")%>">
  391. <INPUT type='hidden' name="p_build_nm" value="<%=params.get("p_build_nm")%>">
  392. <INPUT type='hidden' name="p_dealer_nm" value="<%=params.get("p_dealer_nm")%>">
  393. <INPUT type='hidden' name="ContFromDt" value="<%=params.get("ContFromDt")%>">
  394. <INPUT type='hidden' name="ContToDt" value="<%=params.get("ContToDt")%>">
  395. <!-- List Search -->
  396. <INPUT type='hidden' name="PUR_CONT_MOD_ID" value="<%=cont.get("PUR_CONT_MOD_ID")%>">
  397. <INPUT type='hidden' name="PUR_CONT_ID" value="<%=cont.get("PUR_CONT_ID")%>">
  398. <INPUT type='hidden' name="MOD_NO" value="<%=cont.get("MOD_NO")%>">
  399. <INPUT type='hidden' name="WARR_GUBUN" value="2">
  400. <INPUT type='hidden' name="WARR_SEQ" value="<%=guar.get("WARR_SEQ")%>">
  401. <INPUT type='hidden' name="CAUSECODE" value="<%=cont.get("CAUSECODE")%>">
  402. <table width="100%">
  403. <colgroup>
  404. <col width="500" />
  405. <col width="*" />
  406. </colgroup>
  407. <tr>
  408. <th>
  409. <div align="left" id="title">
  410. <ul><li>구매_하도급대금지급보증 상세<font style="font-size:11px"> </font></li></ul>
  411. </div>
  412. </th>
  413. <td align="right">
  414. <span class="btnSearch center" id="btn_list"><a href="javascript:void(0);">목록</a></span>
  415. </td>
  416. </tr>
  417. </table>
  418. <div class="application-info magT10">
  419. <div class="application-sub-title">
  420. <span class="title">계약정보</span>
  421. </div>
  422. </div>
  423. <!-- 발주의뢰정보 : 시작 -->
  424. <TABLE class="form-table">
  425. <colgroup>
  426. <col width="160"/>
  427. <col width="20%">
  428. <col width="160"/>
  429. <col width="20%">
  430. <col width="160"/>
  431. <col/>
  432. </colgroup>
  433. <TR height="25">
  434. <TH> 현장</TH>
  435. <TD><%=cont.get("DEPT_NAME") %></TD>
  436. <TH> 계약번호</TH>
  437. <TD><a href="javascript:doSignFile();"><%=cont.get("CON_DOC_NO")%></a>
  438. </TD>
  439. <TH> 계약명</TH>
  440. <TD><%=cont.get("BUILD_NAME")%></TD>
  441. </TR>
  442. <TR height="25">
  443. <TH> 업체명</TH>
  444. <TD><%= cont.get("MEMBER_NAME")%></TD>
  445. <TH> 공사기간</TH>
  446. <TD><%= cont.get("START_WORK_DATE")%> ~ <%= cont.get("END_WORK_DATE")%></TD>
  447. <TH> 계약금액</TH>
  448. <TD><%= cont.get("CON_AMT")%></TD>
  449. </TR>
  450. <TR height="25">
  451. <TH> 계약일자</TH>
  452. <TD><%=cont.get("CON_DATE") %></TD>
  453. <TH> 발급여부</TH>
  454. <TD><%= guar.get("WARR_STATUS") %></TD>
  455. <TH> 변경구분</TH>
  456. <TD><%=Formatter2.currency(cont.get("CAUSECODE_NM"),0) %></TD>
  457. </TR>
  458. <!-- 계약정보 : 종료 -->
  459. </table>
  460. <table id=item_list width="100%">
  461. <colgroup>
  462. <col width="500" />
  463. <col width="*" />
  464. </colgroup>
  465. <tr>
  466. <th>
  467. <div class="application-info magT20">
  468. <div class="application-sub-title">
  469. <span class="title">잔여기성 검색</span>
  470. </div>
  471. </div>
  472. </th>
  473. <td align="right">
  474. </td>
  475. </tr>
  476. </table>
  477. <div id="sheet2_div" style="padding-top:5px;height: auto; min-height: 250px; overflow: auto;">
  478. <script>createIBSheet('sheet2','100%', '250px');</script>
  479. </div>
  480. <table width="100%" id="corp_list_title">
  481. <colgroup>
  482. <col width="500" />
  483. <col width="*" />
  484. </colgroup>
  485. <tr>
  486. <th>
  487. <div class="application-info magT15">
  488. <div class="application-sub-title">
  489. <span class="title">보증금 계산</span>
  490. </div>
  491. </div>
  492. </th>
  493. <td align="right">
  494. <% if (!guar.get("WARR_STATUS").equals("완료")) {%>
  495. <span class="btnSearch center" id="btn_save"><a href="javascript:void(0);">저장</a></span>
  496. <% }%>
  497. </td>
  498. </tr>
  499. </table>
  500. <!-- 발주의뢰정보 : 시작 -->
  501. <TABLE class="form-table">
  502. <colgroup>
  503. <col width="160"/>
  504. <col width="20%">
  505. <col width="160"/>
  506. <col width="20%">
  507. <col width="160"/>
  508. <col/>
  509. </colgroup>
  510. <TR height="25">
  511. <TH> 계약금액</TH>
  512. <TD><%= InputText.get("CON_AMT", Formatter2.currency(guar.get("CON_AMT"),0), 13, 300, "Right,Number","Number") %></TD>
  513. <TH> 공사시작일</TH>
  514. <TD> <%= InputText.get("START_WORK_DATE", guar.get("START_WORK_DATE"), 10, 10, "desc=계약일자,center,readOnly") %>
  515. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('START_WORK_DATE');">
  516. </TD>
  517. <TH> 계약이행(준공)일</TH>
  518. <TD><%= InputText.get("END_WORK_DATE", guar.get("END_WORK_DATE"), 10, 10, "desc=준공일자,center,readOnly") %>
  519. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('END_WORK_DATE');">
  520. <INPUT type='text' name="dur_date" value="" size="40" style="border: 0px;" readonly>
  521. </TR>
  522. <TR height="25">
  523. <TH> 대금지급주기</TH>
  524. <TD><%= InputText.get("FILESIZE", Formatter2.currency(guar.get("FILESIZE"),0), 1, 30, "Right,Number","Number") %>개월마다 1회</TD>
  525. <TH> 계약상선급금<p>(미정산선급)</TH>
  526. <TD><%= InputText.get("ADDPREPAYAMT", Formatter2.currency(guar.get("ADDPREPAYAMT"),0), 13, 300, "Right,Number","Number") %></TD>
  527. <TH> 보증금액</TH>
  528. <TD><%= InputText.get("WARR_WAMT", Formatter2.currency(guar.get("WARR_WAMT"),0), 13, 300, "Right,Number","Number") %></TD>
  529. </TR>
  530. <!-- 보증금 계산 : 종료 -->
  531. </table>
  532. <div class="application-info magT10">
  533. <div class="application-sub-title">
  534. <span class="title">보증서첨부</span>
  535. </div>
  536. </div>
  537. <div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 160px; overflow: auto;">
  538. <script>createIBSheet('sheet1','100%', '160px');</script>
  539. </div>
  540. </form>