SubconPayGuarDetail.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598
  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/outside/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/outside/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/outside/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/outside/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 = "subconPayOutOffPopup";
  123. var param = "";
  124. var param = "?subContModId=" + jQuery("#SUB_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/subconPayOutOffPopup.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 + "&SUB_CONT_ID=" + jQuery("#SUB_CONT_ID").val();
  176. var param = param + "&MOD_NO=" + jQuery("#MOD_NO").val();
  177. url = "/portal/guar/subconPayOutOnPopup.screen"+param;
  178. fLayerPop(win_id, url, 800,700, '','', 'YES');
  179. }
  180. }
  181. }
  182. //보증정보팝업 종료후 액션
  183. function popContWarrClose(returnValue){
  184. if(returnValue == null){
  185. fLayerPopClose('subconPayOutOffPopup');
  186. }else{
  187. if(returnValue[0] == 0){
  188. fLayerPopClose('subconPayOutOffPopup');
  189. var f = document.form1;
  190. f.isSubmit = false;
  191. $("#SUB_CONT_MOD_ID").val(returnValue[2]);
  192. reDisplay();
  193. //jQuery("#fevent").val("SHEET_WARR");
  194. //var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/outside/SubconPayGuarList_sheet.screen";
  195. //Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 10, "");
  196. }
  197. }
  198. }
  199. function doAttachFilePop(obj, No, fObj, fileGB, fileDir) {
  200. var editFile = "";
  201. if(obj==''){
  202. alert("After you have saved, you can attach a file.");
  203. }
  204. else if(obj != ''){
  205. if(fObj.guarStatus.value != "02"){editFile="Y";}else{editFile="Y";}
  206. if(No=="1"){
  207. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar1, editFile, fileDir, "subconPayOutOffPopup");
  208. }else{
  209. viewFileListNew(fileGB, obj.value, fObj.p_AttachFileGuar2, editFile, fileDir, "subconPayOutOffPopup");
  210. }
  211. }
  212. }
  213. /**
  214. * IBSheet object initialize
  215. */
  216. function gridInit(sheetName){
  217. var init_sheet = {};
  218. init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly};
  219. if(sheetName.id == "sheet1"){
  220. init_sheet.Cols = [
  221. {Header:'보증구분', Type:"Text", SaveName:"WARR_PAY_NM", Width:100, Align:"Left" , Edit:"false"},
  222. //{Header:'증서번호', Type:"Text", SaveName:"WARR_WGNO", Width:150, Align:"Left" , Edit:"false"},
  223. {Header:'발급기관', Type:"Text", SaveName:"WARR_GOFFICE", Width:150, Align:"Left" , Edit:"false"},
  224. {Header:'보증금액', Type:"Text", SaveName:"WARR_WAMT", Width:100, Align:"right", Edit:"false"},
  225. {Header:'수수료', Type:"Text", SaveName:"WARR_COMMSN", Width:100, Align:"right", Edit:"false"},
  226. {Header:'보증기간', Type:"Text", SaveName:"WARR_START_END_DATE", Width:150, Align:"Center", Edit:"false"},
  227. {Header:'발급일', Type:"Text", SaveName:"PAPERDATE", Width:80, Align:"Center", Edit:"false"},
  228. {Header:'발급구분', Type:"Combo", SaveName:"GUAR_ONOFF_YN", Width:80, Align:"Center" , Edit:"true", ComboText:"선택|온라인|오프라인|비대상", ComboCode:"|Y|N|F"},
  229. {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS_NM", Width:80, Align:"center", Edit:"false"},
  230. {Header:'보증신청계약번호', Type:"Text", SaveName:"GRTREQNO", Width:100, Align:"Left", Edit:"false"},
  231. {Header:'SUB_CONT_MOD_ID', Type:"Text", SaveName:"SUB_CONT_MOD_ID", Width:0, Align:"Center", Hidden:"True"},
  232. {Header:'WARR_GUBUN', Type:"Text", SaveName:"WARR_GUBUN", Width:0, Align:"Center", Hidden:"True"},
  233. {Header:'WARR_SEQ', Type:"Text", SaveName:"WARR_SEQ", Width:0, Align:"Center", Hidden:"True"},
  234. {Header:'CAUSECODE', Type:"Text", SaveName:"CAUSECODE", Width:0, Align:"Center", Hidden:"True"},
  235. {Header:'보증등록', Type:"Image", SaveName:"BTN", Width:80, Align:"Center", Edit:"false", Cursor:"Pointer"},
  236. {Header:'비고', Type:"Text", SaveName:"WARR_GREM", Width:100, Align:"Left", Edit:"false"},
  237. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:50, Align:"Center", Hidden:"True"},
  238. {Header:'진행상태', Type:"Text", SaveName:"GUAR_STATUS", Width:50, Align:"Center", Hidden:"True"},
  239. {Header:'수신기관', Type:"Text", SaveName:"WARR_GOFFICE_ID", Width:50, Align:"Center", Hidden:"True"},
  240. ];
  241. init_sheet.HeaderMode = {Sort:1};
  242. IBS_InitSheet(sheetName, init_sheet);
  243. sheetName.SetDataAutoTrim(0);
  244. sheetName.SetImageList(1,"/img/buyer/btn/btn_write.gif");
  245. sheetName.SetImageList(2,"/img/buyer/btn/error_detail_plus.gif");
  246. }else{
  247. init_sheet.Cols = [
  248. {Header:'상태|상태', Type:"Status", SaveName:"Status", Width:100, Align:"Left", Hidden:"True"},
  249. {Header:'현장명|현장명', Type:"Text", SaveName:"DEPT_NAME", Width:100, Align:"Left"},
  250. {Header:'계약번호|계약번호', Type:"Text", SaveName:"CON_DOC_NO", Width:120, Align:"Left", Hidden:"True"},
  251. {Header:'계약명|계약명', Type:"Text", SaveName:"BUILD_NAME", Width:110, Align:"Left"},
  252. {Header:'업체명|업체명', Type:"Text", SaveName:"MEMBER_NAME", Width:100, Align:"Left"},
  253. {Header:'공사기간|공사기간', Type:"Text", SaveName:"START_END_WORK_DATE", Width:130, Align:"Left"},
  254. {Header:'통화구분|통화구분', Type:"Text", SaveName:"CURRENCY_GB", Width:55, Align:"Center"},
  255. {Header:'통화구분자리|통화구분자리', Type:"Int", SaveName:"CURRENCY_DIGIT", Width:100, Align:"Left", Hidden:"True"},
  256. {Header:'계약금액|계약금액', Type:"Int", SaveName:"CON_SUPPLY_AMT", Width:80, Align:"Right"},
  257. {Header:'계약금액|합계', Type:"Int", SaveName:"CON_AMT", Width:40, Align:"Right", Hidden:"True"},
  258. {Header:'계약상선급금|계약상선급금', Type:"Int", SaveName:"PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
  259. {Header:'선급금발생|선급금발생', Type:"Int", SaveName:"REQ_PREPAY_SUPPLY_AMT", Width:80, Align:"Right"},
  260. {Header:'선급금\n신청날짜|선급금\n신청날짜',Type:"Text", SaveName:"PREPAY_DATE", Width:65, Align:"Right"},
  261. {Header:'기성년월|기성년월', Type:"Text", SaveName:"ACMP_YYYYMM", Width:50, Align:"Right"},
  262. {Header:'지급\n차수|지급\n차수', Type:"Int", SaveName:"ACMP_NO", Width:40, Align:"Right"},
  263. {Header:'기성액|금회기성', Type:"Int", SaveName:"FUND_AMT", Width:80, Align:"Right"},
  264. {Header:'기성액|선급금공제', Type:"Int", SaveName:"PAY_DEDUCT_AMT", Width:80, Align:"Right"},
  265. {Header:'기성액|실지불액', Type:"Int", SaveName:"REQU_SUPPLY_AMT", Width:80, Align:"Right"},
  266. {Header:'기성액|잔여기성', Type:"Int", SaveName:"MOD_FUND_AMT", Width:80, Align:"Right"},
  267. {Header:'기성율\n(%)|기성율\n(%)', Type:"Float", SaveName:"FUND_RATE", Width:40, Align:"Right", Format:"##0.00"},
  268. {Header:'상태|상태', Type:"Text", SaveName:"STATUS_CD", Width:50, Align:"Center"},
  269. ];
  270. init_sheet.HeaderMode = {Sort:1};
  271. IBS_InitSheet(sheetName, init_sheet);
  272. sheetName.SetDataAutoTrim(0);
  273. sheetName.SetEditable(false);
  274. var info = [{StdCol:1, SumCols:"CON_AMT|FUND_AMT", ShowCumulate:0,Sort:0,CaptionCol:1}
  275. ,{StdCol:2, SumCols:"CON_AMT|FUND_AMT|PAY_DEDUCT_AMT|REQU_SUPPLY_AMT|FUND_RATE", ShowCumulate:0,Sort:0,CaptionCol:2}];
  276. sheetName.ShowSubSum(info);
  277. sheetName.SetActionMenu("ExcelDown");
  278. }
  279. setGridSize();
  280. }
  281. /**
  282. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  283. */
  284. function sheet1_OnSearchEnd(code, message) {
  285. var fevent = $("#fevent").val();
  286. if(code == 0) {
  287. if("GUAR_SHEET" == fevent){
  288. doSearchSheet2();
  289. }
  290. } else {
  291. //조회 에러 수행
  292. alert(message);
  293. }
  294. }
  295. /**
  296. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  297. */
  298. function sheet2_OnSearchEnd(code, message) {
  299. var fevent = $("#fevent").val();
  300. if(code == 0) {
  301. if ($("#WARR_WAMT").val() == ""){
  302. doCalculation();
  303. }
  304. } else {
  305. //조회 에러 수행
  306. alert(message);
  307. }
  308. }
  309. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  310. if ((sheet1.ColSaveName(Col) == "BTN")) {
  311. var comboValue = sheet1.GetCellValue(Row,"GUAR_ONOFF_YN");
  312. if(comboValue == "F" ){
  313. var Status = sheet1.GetCellValue(Row,"STATUS");
  314. if(Status=="R"){
  315. alert("변경된 데이터가 없습니다.");
  316. return;
  317. }
  318. var bigo = sheet1.GetCellValue(Row,"WARR_GREM");;
  319. if(bigo == "" || bigo == null){
  320. alert("비대상 사유를 비고란에 입력하세요");
  321. return;
  322. }
  323. if(!confirm("비대상 보증정보를 저장하시겠습니까?")) return;
  324. jQuery("#fevent").val("NOT_GUAR_SAVE");
  325. var url = Modular.model.PageContext.CONTEXT_ROOT + "/cont/outside/SubconPayGuarList_sheet.screen";
  326. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  327. }else{
  328. 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"))
  329. }
  330. }
  331. }
  332. /**
  333. * IBSheet size setting
  334. */
  335. function setGridSize() {
  336. sheet1.FitColWidth();
  337. sheet2.FitColWidth();
  338. }
  339. function doResult(resultObj) {
  340. try {
  341. if( resultObj.getRequestEvent() == "FORM_UPDATE") {
  342. if( resultObj.getSuccess() ) {
  343. alert("저장 되었습니다.");
  344. $("#btn_list").click();
  345. }
  346. else {
  347. dlgErrorMsg(resultObj);
  348. }
  349. }else if( resultObj.getRequestEvent() == "GUAR_SAVE" ) {
  350. if( resultObj.getSuccess() ) {
  351. document.form1.isSubmit = false;
  352. alert("저장되었습니다.");
  353. reDisplay();
  354. }else {
  355. dlgErrorMsg(resultObj);
  356. }
  357. }
  358. } catch(errorObject) {
  359. showErrorDlg("doResult()", errorObject);
  360. }
  361. }
  362. function sheet1_OnSmartResize(Width, Height) {
  363. setGridSize();
  364. autoResize();
  365. }
  366. function autoResize(){
  367. sheet1.SetSheetHeight(160);
  368. sheet2.SetSheetHeight(250);
  369. }
  370. function reDisplay() {
  371. jQuery("#fevent").val("UPDATE_DATA");
  372. jQuery("#form1").attr("action", "/cont/outside/SubconPayGuarDetail.screen");
  373. jQuery("#form1").attr("target", "_self");
  374. jQuery("#form1").attr("method", "post");
  375. jQuery("#form1").submit();
  376. }
  377. function doSignFile(){
  378. var job_div = "O";
  379. var popUrl = "/payment/outside/PayItemOutDashBoardPop.screen?job_div="+job_div+"&sModule=LM&subContId="+ jQuery("#SUB_CONT_ID").val()+"&job_auth=<%= user.get("RIGHT_NAME")%>";
  380. job_div = "O";
  381. var popOption = "width=800, height=600, resizable=no, scrollbars=yes, status=no;";
  382. window.open(popUrl,"",popOption);
  383. }
  384. </SCRIPT>
  385. <modular:search id="form1">
  386. <modular:key id="fevent" />
  387. </modular:search>
  388. <BODY onresize="autoResize()">
  389. <form id="form1" name="form1" method="post" modular:type="search">
  390. <INPUT type='hidden' name="fevent" id="fevent" value="">
  391. <!-- List Search -->
  392. <INPUT type='hidden' name="p_dept_cd" value="<%=params.get("p_dept_cd")%>">
  393. <INPUT type='hidden' name="p_dept_nm" value="<%=params.get("p_dept_nm")%>">
  394. <INPUT type='hidden' name="p_build_nm" value="<%=params.get("p_build_nm")%>">
  395. <INPUT type='hidden' name="p_dealer_nm" value="<%=params.get("p_dealer_nm")%>">
  396. <INPUT type='hidden' name="ContFromDt" value="<%=params.get("ContFromDt")%>">
  397. <INPUT type='hidden' name="ContToDt" value="<%=params.get("ContToDt")%>">
  398. <!-- List Search -->
  399. <INPUT type='hidden' name="SUB_CONT_MOD_ID" value="<%=cont.get("SUB_CONT_MOD_ID")%>">
  400. <INPUT type='hidden' name="SUB_CONT_ID" value="<%=cont.get("SUB_CONT_ID")%>">
  401. <INPUT type='hidden' name="MOD_NO" value="<%=cont.get("MOD_NO")%>">
  402. <INPUT type='hidden' name="WARR_GUBUN" value="2">
  403. <INPUT type='hidden' name="WARR_SEQ" value="<%=guar.get("WARR_SEQ")%>">
  404. <INPUT type='hidden' name="CAUSECODE" value="<%=cont.get("CAUSECODE")%>">
  405. <table width="100%">
  406. <colgroup>
  407. <col width="500" />
  408. <col width="*" />
  409. </colgroup>
  410. <tr>
  411. <th>
  412. <div align="left" id="title">
  413. <ul><li>외주_하도급대금지급보증 상세<font style="font-size:11px"> </font></li></ul>
  414. </div>
  415. </th>
  416. <td align="right">
  417. <span class="btnSearch center" id="btn_list"><a href="javascript:void(0);">목록</a></span>
  418. </td>
  419. </tr>
  420. </table>
  421. <div class="application-info magT10">
  422. <div class="application-sub-title">
  423. <span class="title">계약정보</span>
  424. </div>
  425. </div>
  426. <!-- 발주의뢰정보 : 시작 -->
  427. <TABLE class="form-table">
  428. <colgroup>
  429. <col width="160"/>
  430. <col width="20%">
  431. <col width="160"/>
  432. <col width="20%">
  433. <col width="160"/>
  434. <col/>
  435. </colgroup>
  436. <TR height="25">
  437. <TH> 현장</TH>
  438. <TD><%=cont.get("DEPT_NAME") %></TD>
  439. <TH> 계약번호</TH>
  440. <TD><a href="javascript:doSignFile();"><%=cont.get("CON_DOC_NO")%></a>
  441. </TD>
  442. <TH> 계약명</TH>
  443. <TD><%=cont.get("BUILD_NAME")%></TD>
  444. </TR>
  445. <TR height="25">
  446. <TH> 업체명</TH>
  447. <TD><%= cont.get("MEMBER_NAME")%></TD>
  448. <TH> 공사기간</TH>
  449. <TD><%= cont.get("START_WORK_DATE")%> ~ <%= cont.get("END_WORK_DATE")%></TD>
  450. <!-- 계약금액이 1천만원 이하일 경우 적색 -->
  451. <TH> 계약금액</TH>
  452. <TD>
  453. <% if (cont.get("CON_AMT_GB").equals("0")){%>
  454. <%=cont.get("CON_AMT")%>
  455. <%}else{ %>
  456. <font color = 'red'><%=cont.get("CON_AMT")%></font>
  457. <%}%>
  458. </TD>
  459. </TD>
  460. </TR>
  461. <TR height="25">
  462. <TH> 계약일자</TH>
  463. <TD><%=cont.get("CON_DATE") %></TD>
  464. <TH> 발급여부</TH>
  465. <TD><%= guar.get("WARR_STATUS") %></TD>
  466. <TH> 변경구분</TH>
  467. <TD><%=Formatter2.currency(cont.get("CAUSECODE_NM"),0) %></TD>
  468. </TR>
  469. <!-- 계약정보 : 종료 -->
  470. </table>
  471. <table id=item_list width="100%">
  472. <colgroup>
  473. <col width="500" />
  474. <col width="*" />
  475. </colgroup>
  476. <tr>
  477. <th>
  478. <div class="application-info magT20">
  479. <div class="application-sub-title">
  480. <span class="title">잔여기성 검색</span>
  481. </div>
  482. </div>
  483. </th>
  484. <td align="right">
  485. </td>
  486. </tr>
  487. </table>
  488. <div id="sheet2_div" style="padding-top:5px;height: auto; min-height: 250px; overflow: auto;">
  489. <script>createIBSheet('sheet2','100%', '250px');</script>
  490. </div>
  491. <table width="100%" id="corp_list_title">
  492. <colgroup>
  493. <col width="500" />
  494. <col width="*" />
  495. </colgroup>
  496. <tr>
  497. <th>
  498. <div class="application-info magT15">
  499. <div class="application-sub-title">
  500. <span class="title">보증금 계산</span>
  501. </div>
  502. </div>
  503. </th>
  504. <td align="right">
  505. <% if (!guar.get("WARR_STATUS").equals("완료")) {%>
  506. <span class="btnSearch center" id="btn_save"><a href="javascript:void(0);">저장</a></span>
  507. <% }%>
  508. </td>
  509. </tr>
  510. </table>
  511. <!-- 발주의뢰정보 : 시작 -->
  512. <TABLE class="form-table">
  513. <colgroup>
  514. <col width="160"/>
  515. <col width="20%">
  516. <col width="160"/>
  517. <col width="20%">
  518. <col width="160"/>
  519. <col/>
  520. </colgroup>
  521. <TR height="25">
  522. <TH> 계약금액</TH>
  523. <TD><%= InputText.get("CON_AMT", Formatter2.currency(guar.get("CON_AMT"),0), 13, 300, "Right,Number","Number") %></TD>
  524. <TH> 공사시작일</TH>
  525. <TD> <%= InputText.get("START_WORK_DATE", guar.get("START_WORK_DATE"), 10, 10, "desc=계약일자,center,readOnly") %>
  526. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('START_WORK_DATE');">
  527. </TD>
  528. <TH> 계약이행(준공)일</TH>
  529. <TD><%= InputText.get("END_WORK_DATE", guar.get("END_WORK_DATE"), 10, 10, "desc=준공일자,center,readOnly") %>
  530. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('END_WORK_DATE');">
  531. <INPUT type='text' name="dur_date" value="" size="40" style="border: 0px;" readonly>
  532. </TR>
  533. <TR height="25">
  534. <TH> 대금지급주기</TH>
  535. <TD><%= InputText.get("FILESIZE", Formatter2.currency(guar.get("FILESIZE"),0), 1, 30, "Right,Number","Number") %>개월마다 1회</TD>
  536. <TH> 계약상선급금<p>(미정산선급)</TH>
  537. <TD><%= InputText.get("ADDPREPAYAMT", Formatter2.currency(guar.get("ADDPREPAYAMT"),0), 13, 300, "Right,Number","Number") %></TD>
  538. <TH> 보증금액</TH>
  539. <TD><%= InputText.get("WARR_WAMT", Formatter2.currency(guar.get("WARR_WAMT"),0), 13, 300, "Right,Number","Number") %></TD>
  540. </TR>
  541. <!-- 보증금 계산 : 종료 -->
  542. </table>
  543. <div class="application-info magT10">
  544. <div class="application-sub-title">
  545. <span class="title">보증서첨부</span>
  546. </div>
  547. </div>
  548. <div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 160px; overflow: auto;">
  549. <script>createIBSheet('sheet1','100%', '160px');</script>
  550. </div>
  551. </form>