ContResultInsur.jsp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454
  1. <%--
  2. - Author(s) : chj
  3. - Date : 2015.04.17
  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. ValueObject ContInfo = storage.getValueObject("ContInfo");
  25. %>
  26. <SCRIPT language="JavaScript">
  27. /*예약함수*/
  28. var must_msg = "(은)는 필수 입력 항목입니다.";
  29. var btn_act;
  30. function _onReady(){
  31. if(<%=!ContInfo.get("INSUR_STATUS_CD").equals("01") %> && <%=!ContInfo.get("INSUR_STATUS_CD").equals("09") %>){
  32. jQuery("#btnSave").hide();
  33. jQuery("#btnDeci").hide();
  34. jQuery("#btnDel").hide();
  35. }
  36. //2017.04.14 삭제기능추가
  37. jQuery("#btnDel").click(function(){
  38. var f = document.form1;
  39. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "CHK", f, "SUCCESS");
  40. btn_act = "to_del";
  41. });
  42. jQuery("#btnSave").click(function(){
  43. var f = document.form1;
  44. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "CHK", f, "SUCCESS");
  45. btn_act = "to_save";
  46. });
  47. jQuery("#btnDeci").click(function(){
  48. var f = document.form1;
  49. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "CHK", f, "SUCCESS");
  50. btn_act = "to_deci";
  51. });
  52. jQuery("#btnList").click(function(){
  53. goListProc();
  54. });
  55. jQuery("#MTIL_AMT").blur(function () {
  56. var mtilAmt = jQuery("#MTIL_AMT").val().replace(/(\,|\:)/g,"");
  57. var digit = jQuery("#sosuNum").val();
  58. jQuery("#MTIL_AMT").val(Number(mtilAmt).toFixed(digit));
  59. jQuery("#MTIL_AMT").each(function(index){
  60. jQuery(this).val(jQuery(this).val().split(/(?=(?:\d{3})+(?:\.|$))/g).join(','));
  61. });
  62. });
  63. }
  64. function goListProc(){
  65. var f = document.form1;
  66. f.fevent.value ="FORM_SELECT";
  67. f.action = "/cont/purchase/ContResult.screen";
  68. f.target = "_self";
  69. f.submit();
  70. }
  71. function must_ck(){
  72. if(must_ck_val("WORK_MNGR_NO",""))return false;
  73. if(!jQuery('input:checkbox[name="INSUR_EMPL_YN"]').is(":checked") && !jQuery('input:checkbox[name="INSUR_ACC_YN"]').is(":checked")){
  74. alert("보험종류 (은)는 필수 입력 항목입니다.")
  75. return false;
  76. }else{
  77. if(jQuery(':checkbox[name="INSUR_EMPL_YN"]:checked').val() != "Y")$("#INSUR_EMPL_YN").val("N");
  78. if(jQuery(':checkbox[name="INSUR_ACC_YN"]:checked').val() != "Y")$("#INSUR_ACC_YN").val("N");
  79. }
  80. if(must_ck_val("BIZ_REG_NO",""))return false;
  81. //if(must_ck_val("CORP_REG_NO",""))return false;
  82. if(must_ck_val("SUB_PLACE_NO",""))return false;
  83. if(must_ck_val("LCNS_NM",""))return false;
  84. if(must_ck_val("LCNS_REG_NO",""))return false;
  85. if(must_ck_val("LCNS_ACQT_DATE",""))return false;
  86. if(must_ck_val("MTIL_AMT",""))return false;
  87. if(must_ck_val("INSUR_WORK_PLACE",""))return false;
  88. return true;
  89. }
  90. // value 값 체크
  91. function must_ck_val(obj,desc){
  92. if(jQuery("#"+obj).val().length == 0){
  93. if(desc.length> 0){
  94. alert(desc+must_msg);
  95. }else{
  96. alert(jQuery("#"+obj).attr("desc")+must_msg);
  97. }
  98. jQuery("#"+obj).focus();
  99. return true;
  100. }
  101. return false;
  102. }
  103. function doResult(resultObj) {
  104. try {
  105. if( resultObj.getRequestEvent() == "CHK") {
  106. if( resultObj.getSuccess() ) {
  107. document.form1.isSubmit = false;
  108. if(btn_act == "to_save"){
  109. if(jQuery(':checkbox[name="INSUR_EMPL_YN"]:checked').val() != "Y")$("#INSUR_EMPL_YN").val("N");
  110. if(jQuery(':checkbox[name="INSUR_ACC_YN"]:checked').val() != "Y")$("#INSUR_ACC_YN").val("N");
  111. var f = document.form1;
  112. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "SAVE_INSUR_DATA", f);
  113. }else if(btn_act == "to_deci"){
  114. if(must_ck()){
  115. if (confirm("결재 하시겠습니까?")){
  116. var f = document.form1;
  117. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "SAVE_INSUR_DATA", f);
  118. }
  119. }
  120. }else if(btn_act == "to_del"){
  121. if (confirm("삭제 하시겠습니까?")){
  122. var f = document.form1;
  123. submitXmlRequest("/cont/purchase/ContResultInsur_form.screen", "DEL_INSUR_DATA", f);
  124. }
  125. }
  126. } else {
  127. alert("결재중입니다.");
  128. }
  129. }
  130. if( resultObj.getRequestEvent() == "SAVE_INSUR_DATA") {
  131. if( resultObj.getSuccess() ) {
  132. document.form1.isSubmit = false;
  133. if(btn_act == "to_deci"){
  134. var f = document.form1;
  135. var sign_key1 = $("#PUR_CONT_MOD_ID").val();
  136. dlgSignForm('ebid_obappD', '/cont/purchase/ContInsurSign.screen?sign_key1='+sign_key1+'^sign_key2=P^acct_id='+"<%=user.get("ACCT_ID")%>");
  137. }else{
  138. alert("저장되었습니다.");
  139. }
  140. } else {
  141. dlgErrorMsg(resultObj);
  142. }
  143. }
  144. if( resultObj.getRequestEvent() == "DEL_INSUR_DATA") {
  145. if( resultObj.getSuccess() ) {
  146. document.form1.isSubmit = false;
  147. alert("삭제되었습니다.");
  148. goListProc();
  149. } else {
  150. dlgErrorMsg(resultObj);
  151. }
  152. }
  153. document.form1.isSubmit = false;
  154. }
  155. catch(errorObject) {
  156. showErrorDlg("doResult()", errorObject);
  157. }
  158. }
  159. function dlgSignForm( sign_class_cd, uri ) {
  160. var f = document.form1;
  161. var sheet1 = document.all.sheet1;
  162. var url = "/contOutsideInsurSign/contInsurSign_form.screen";
  163. url += "?sign_class_cd=" + sign_class_cd;
  164. url += "&uri=" + uri;
  165. url += "&sign_key1=" + $("#PUR_CONT_MOD_ID").val();
  166. url += "&sign_key2=P";
  167. url += "&acct_type=1";
  168. window.open(url, "_blank","width=200,height=100,SCROLLBARS=no");
  169. }
  170. function corpPopup(corpID){
  171. var url = "/cont/purchase/ContTargetPopup.screen";
  172. url += "?p_corp_id=" + corpID;
  173. url += "&sModule="+"LM";
  174. window.open(url, "_ContTargetPop","width=1000,height=650,SCROLLBARS=no");
  175. }
  176. </SCRIPT>
  177. <modular:search id="form1">
  178. <modular:key id="fevent" />
  179. </modular:search>
  180. <form id="form1" name="form1" method="post" modular:type="search">
  181. <INPUT type="hidden" name="fevent" id="fevent" value="">
  182. <INPUT type="hidden" name="acct_id" value="<%= params.get("acct_id") %>">
  183. <!-- 검색 조건 시작-->
  184. <INPUT type="hidden" name="p_dept_cd" value="<%= params.get("p_dept_cd") %>">
  185. <INPUT type="hidden" name="p_dept_nm" value="<%= params.get("p_dept_nm") %>">
  186. <INPUT type="hidden" name="p_dealer_nm" value="<%= params.get("p_dealer_nm") %>">
  187. <INPUT type="hidden" name="p_cont_status" value="<%= params.get("p_cont_status") %>">
  188. <INPUT type="hidden" name="ContFromDt" value="<%= params.get("ContFromDt") %>">
  189. <INPUT type="hidden" name="ContToDt" value="<%= params.get("ContToDt") %>">
  190. <INPUT type="hidden" name="p_build_nm" value="<%= params.get("p_build_nm") %>">
  191. <!-- 검색 조건 끝-->
  192. <INPUT type="hidden" name="CONT_STATUS" value="<%=ContInfo.get("CONT_STATUS")%>">
  193. <INPUT type="hidden" name="PUR_CONT_MOD_ID" value="<%=ContInfo.get("PUR_CONT_MOD_ID")%>">
  194. <INPUT type="hidden" name="O_CORP_ID" value="<%=ContInfo.get("O_CORP_ID")%>">
  195. <INPUT type="hidden" name="C_CORP_ID" value="<%=ContInfo.get("C_CORP_ID")%>">
  196. <INPUT type="hidden" name="STATUS_CD" value="<%=ContInfo.get("STATUS_CD")%>">
  197. <INPUT type="hidden" name="O_VENDCD" value="<%=ContInfo.get("O_VENDCD")%>">
  198. <INPUT type="hidden" name="ChgCont" value="<%= params.get("ChgCont") %>">
  199. <INPUT type="hidden" name="TEMPLATE_NAME" value="<%=params.get("template_name")%>">
  200. <!-- 계약서PDF정보 START-->
  201. <INPUT type="hidden" name="TEMPLATE_CD" value="<%=ContInfo.get("TEMPLATE_CD") %>">
  202. <INPUT type="hidden" name="CON_DOC_NO" value="<%=ContInfo.get("ORD_DOC_NO") %>">
  203. <INPUT type="hidden" name="MOD_NO" value="<%=ContInfo.get("MOD_NO") %>">
  204. <INPUT type="hidden" name="TRUE_RANDOM" value="<%=ContInfo.get("TRUE_RANDOM") %>">
  205. <!-- 계약서PDF정보 END-->
  206. <INPUT type="hidden" name="O_REG_NO" value="<%=ContInfo.get("O_REG_NO") %>">
  207. <!-- 제목 및 버튼 -->
  208. <table width="100%">
  209. <colgroup>
  210. <col width="500" />
  211. <col width="*" />
  212. </colgroup>
  213. <tr>
  214. <th>
  215. <div align="left" id="title">
  216. <ul>
  217. <li>외주_하수급인 신청서</li>
  218. </ul>
  219. </div>
  220. </th>
  221. <td align="right">
  222. <span class="btnSearch center" id="btnDel"><a href="javascript:void(0);">삭제</a></span>
  223. <span class="btnSearch center" id="btnSave"><a href="javascript:void(0);">저장</a></span>
  224. <span class="btnSearch center" id="btnDeci"><a href="javascript:void(0);">결재</a></span>
  225. <span class="btnSearch center" id="btnList"><a href="javascript:void(0);">이전</a></span>
  226. </td>
  227. </tr>
  228. </table>
  229. <!-- 계약 정보 : 시작 -->
  230. <div class="application-info magT10">
  231. <div class="application-sub-title">
  232. <span class="title">기본정보</span>
  233. </div>
  234. <div class="application-location">
  235. </div>
  236. </div>
  237. <TABLE class="form-table">
  238. <colgroup>
  239. <col width="130px" />
  240. <col width="24%"/>
  241. <col width="130px" />
  242. <col width="24%"/>
  243. <col width="130px" />
  244. <col/>
  245. </colgroup>
  246. <TR height="25">
  247. <TH>현장명</TH>
  248. <TD><%= ContInfo.get("DEPT_NAME")%></TD>
  249. <TH>발주의뢰번호</TH>
  250. <TD><%=ContInfo.get("DEMANDED_NO")%></TD>
  251. <TH>발주의뢰자</TH>
  252. <TD><%= ContInfo.get("EMP_NM")%></TD>
  253. </TR>
  254. <TR height="25">
  255. <TH>발주의뢰일</TH>
  256. <TD><%= ContInfo.get("DEMANDED_DATE")%></TD>
  257. <TH>발주의뢰부서</TH>
  258. <TD><%= ContInfo.get("REQ_DEPT_NM")%></TD>
  259. <TH>공종88</TH>
  260. <TD><%= ContInfo.get("OUT_ITEM_NM")%></TD>
  261. </TR>
  262. <TR height="25">
  263. <TH>계약명</TH>
  264. <TD colspan="3"><%= ContInfo.get("CST_DOC_NAME")%></TD>
  265. <TH>통화구분</TH>
  266. <TD><%= ContInfo.get("CURRENCY_GB")%><INPUT TYPE="hidden" name="sosuNum" ID="sosuNum" value="<%= ContInfo.get("SOSUNUM")%>">
  267. </TR>
  268. <TR height="25">
  269. <TH>전자계약 여부</TH>
  270. <TD colspan="5">
  271. <%=ContInfo.get("ELEC_CON_YN").equals("Y") ? "온라인" : "오프라인" %>
  272. </TD>
  273. </TR>
  274. </TABLE>
  275. <div class="application-info magT10">
  276. <div class="application-sub-title">
  277. <span class="title">당사정보(원사업자) </span><font color="red">*필수입력항목</font>
  278. </div>
  279. <div class="application-location">
  280. <%if (!ContInfo.get("O_SIGN_DATE").equals("")){%>
  281. 서명일시 : <%= ContInfo.get("O_SIGN_DATE") %>
  282. <%}%>
  283. </div>
  284. </div>
  285. <TABLE class="form-table">
  286. <colgroup>
  287. <col width="130px" />
  288. <col width="24%"/>
  289. <col width="130px" />
  290. <col width="24%"/>
  291. <col width="130px" />
  292. <col/>
  293. </colgroup>
  294. <TR height="25">
  295. <TH>업체명</TH>
  296. <TD colspan="3"><%= ContInfo.get("O_MEMBER_NAME")%></TD>
  297. <TH>대표자명</TH>
  298. <TD><%= ContInfo.get("O_BOSS_NAME")%></TD>
  299. </TR>
  300. <TR height="25">
  301. <TH>주소</TH>
  302. <TD colspan="3"><%= ContInfo.get("O_ADDRESS")%></TD>
  303. <TH>승인자</TH>
  304. <TD>
  305. <%= ContInfo.get("CON_CONFIRM_NAME")%>
  306. </TD>
  307. </TR>
  308. <TR height="25">
  309. <TH>담당부서</TH>
  310. <TD><%= ContInfo.get("O_DIVISION")%></TD>
  311. <TH>담당자명</TH>
  312. <TD>
  313. <%= ContInfo.get("O_USER_NAME")%>
  314. </TD>
  315. <TH>직급</TH>
  316. <TD><%= ContInfo.get("O_POSITION")%></TD>
  317. </TR>
  318. <TR height="25">
  319. <TH>담당자 연락처</TH>
  320. <TD><%= ContInfo.get("O_TEL_NUM")%></TD>
  321. <TH>담당자 HP</TH>
  322. <TD><%= ContInfo.get("O_HP")%></TD>
  323. <TH>담당자 EMAIL</TH>
  324. <TD><%= ContInfo.get("O_EMAIL")%></TD>
  325. </TR>
  326. <TR height="25">
  327. <TH class="required">사업장 관리 번호</TH>
  328. <TD>
  329. <%= InputText.get("WORK_MNGR_NO", ContInfo.get("WORK_MNGR_NO"), 98, 30, "required,desc=사업장 관리 번호,persize") %>
  330. </TD>
  331. <TH class="required">보험종류</TH>
  332. <TD colspan="3">
  333. <LABEL for="INSUR_YN"><INPUT type="checkbox" id="INSUR_EMPL_YN" name="INSUR_EMPL_YN" value="Y" <%=ContInfo.get("INSUR_EMPL_YN").equals("Y") ? "checked=\"checked\"" : "" %>>&nbsp;고용보험&nbsp;</LABEL>
  334. <LABEL for="INSUR_YN"><INPUT type="checkbox" id="INSUR_ACC_YN" name="INSUR_ACC_YN" value="Y" <%=ContInfo.get("INSUR_ACC_YN").equals("Y") ? "checked=\"checked\"" : "" %>>&nbsp;산재보험&nbsp;</LABEL>
  335. </TD>
  336. <!-- 계약정보 : 종료 -->
  337. </table>
  338. <div class="application-info magT10">
  339. <div class="application-sub-title">
  340. <span class="title">계약업체정보(수급 사업자) </span><font color="red">*필수입력항목</font>
  341. </div>
  342. <div class="application-location">
  343. <%if (!ContInfo.get("C_SIGN_DATE").equals("")){%>
  344. 서명일시 : <%= ContInfo.get("C_SIGN_DATE") %>
  345. <%}%>
  346. </div>
  347. </div>
  348. <TABLE class="form-table">
  349. <colgroup>
  350. <col width="130px" />
  351. <col width="24%"/>
  352. <col width="130px" />
  353. <col width="24%"/>
  354. <col width="130px" />
  355. <col/>
  356. </colgroup>
  357. <TR height="25">
  358. <TH>업체명</TH>
  359. <TD colspan="3"><a href="javascript:corpPopup('<%=ContInfo.get("C_CORP_ID") %>');"><%= ContInfo.get("C_MEMBER_NAME")%></a></TD>
  360. <TH>대표자명</TH>
  361. <TD><%= ContInfo.get("C_BOSS_NAME")%></TD>
  362. </TR>
  363. <TR height="25">
  364. <TH>주소</TH>
  365. <TD colspan="5"><%= ContInfo.get("C_ADDRESS")%></TD>
  366. </TR>
  367. <TR height="25">
  368. <TH>담당부서</TH>
  369. <TD><%= ContInfo.get("C_DIVISION")%></TD>
  370. <TH>담당자명</TH>
  371. <TD><%= ContInfo.get("C_USER_NAME")%></TD>
  372. <TH>직급</TH>
  373. <TD><%= ContInfo.get("C_POSITION")%></TD>
  374. </TR>
  375. <TR height="25">
  376. <TH>담당자 연락처</TH>
  377. <TD><%= ContInfo.get("C_TEL_NUM")%></TD>
  378. <TH class="required">담당자 HP</TH>
  379. <TD><%= ContInfo.get("C_HP")%></TD>
  380. <TH>담당자 EMAIL</TH>
  381. <TD><%= ContInfo.get("C_EMAIL")%></TD>
  382. </TR>
  383. <TR height="25">
  384. <!-- 사업자 등록번호 => 사업장 관리 번호(CORP_REG_NO => SUB_PLACE_NO) -->
  385. <TH class="required">사업장 관리 번호</TH>
  386. <TD><%= InputText.get("SUB_PLACE_NO", ContInfo.get("SUB_PLACE_NO"), 98, 30, "required,desc=사업장 관리 번호,persize") %></TD>
  387. <TH class="required">법인 등록 번호</TH>
  388. <TD><%= InputText.get("BIZ_REG_NO", ContInfo.get("BIZ_REG_NO"), 98, 30, "required,desc=법인 등록 번호,persize") %></TD>
  389. <TH>공사기간</TH>
  390. <TD><%= ContInfo.get("ORD_START_DATE")%>&nbsp;&nbsp;~&nbsp;&nbsp;<%= ContInfo.get("ORD_END_DATE")%></TD>
  391. </TR>
  392. <TR height="25">
  393. <TH class="required">면허명</TH>
  394. <TD><%= InputText.get("LCNS_NM", ContInfo.get("LCNS_NM"), 98, 30, "required,desc=면허명,persize") %></TD>
  395. <TH class="required">면허 등록 번호</TH>
  396. <TD><%= InputText.get("LCNS_REG_NO", ContInfo.get("LCNS_REG_NO"), 98, 30, "required,desc=면허 등록 번호,persize") %></TD>
  397. <TH class="required">면허 취득일자</TH>
  398. <TD>
  399. <%= InputText.get("LCNS_ACQT_DATE", ContInfo.get("LCNS_ACQT_DATE"), 10, 10, "desc=견적설명일시,readOnly,center") %>
  400. <IMG name="calendar_sitedescdate" id="calendar_sitedescdate" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('LCNS_ACQT_DATE');">
  401. </TD>
  402. </TR>
  403. <TR height="25">
  404. <TH>공사금액</TH>
  405. <TD align="right"><%= Formatter2.currency(ContInfo.get("ORD_SUPPLY_AMT"), ContInfo.getInt("SOSUNUM"))%></TD>
  406. <TH class="required">자재비</TH>
  407. <TD colspan="3"><%= InputText.get("MTIL_AMT", Formatter2.currency(ContInfo.get("MTIL_AMT"), ContInfo.getInt("SOSUNUM")), 50, 30, "required,desc=자재비,persize, right,float","float") %></TD>
  408. </TR>
  409. <TR height="25">
  410. <TH class="required">공사장소</TH>
  411. <TD colspan="5"><%= InputText.get("INSUR_WORK_PLACE", ContInfo.get("INSUR_WORK_PLACE"), 98, 30, "required,desc=공사장소,persize") %></TD>
  412. </TR>
  413. <!-- 계약정보 : 종료 -->
  414. </table>