vendorPrintCheck.jsp 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444
  1. <%--
  2. - FileName : UserList.jsp
  3. - Author(s) : Joung Kyu Park
  4. - Date : 2007.05.16
  5. - Copyright : Copyright (c) 2002-2007 www.hwenc.com, Inc.
  6. -
  7. - Description: 사용자 등록
  8. --%>
  9. <%@ page contentType="text/html; charset=utf-8" %>
  10. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  11. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  12. <%@ page import="kr.co.hsnc.common.util.*"%>
  13. <%@ page import="kr.co.hsnc.common.sql.*" %>
  14. <%@ page import="kr.co.hsnc.common.util.Formatter"%>
  15. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  16. <%@ include file="/jsp/work/taglib.jsp"%>
  17. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  18. <%
  19. ctx.init(request, response);
  20. HandlerStorage storage = ctx.getHandlerStorage();
  21. ValueObject params = storage.getParams();
  22. ValueObject user = storage.getUser();
  23. String event = storage.getEvent();
  24. ValueObject prePayment = storage.getValueObject("prePayment"); //기본정보, 세금계산서정보, 선급금정보
  25. ValueObject filein = storage.getValueObject("PURCHASE_"+prePayment.get("PAYREQ_ID"));
  26. String digit = "0"; //(String)prePayment.get("digit");
  27. int intDigit = Integer.parseInt(digit);
  28. // return_reson_area
  29. String status = prePayment.get("VP_STATUS");
  30. %>
  31. <script type="text/javascript">
  32. <!--
  33. $(document).ready(function(){
  34. var status = "<%=status%>";
  35. if(status == "03") //신청대상(검토대상)
  36. {
  37. $("#return_reson_area").css("display", "none");
  38. $("#btn_confim_area").css("display", "none");
  39. $("#btn_return_area").css("display", "none");
  40. }
  41. if(status == "40") //VP심사중
  42. {
  43. $("#return_reson_area").css("display", "none");
  44. }
  45. if(status == "50" || status == "60" )
  46. {
  47. $("#opinion").attr("readonly", true);
  48. $("#btn_save_area").css("display", "none");
  49. $("#btn_confim_area").css("display", "none");
  50. $("#btn_return_area").css("display", "none");
  51. }
  52. });
  53. $(function(){
  54. //첨부파일
  55. $("#search_spot_button").click(function(){
  56. var obj = $("#payreqId").val();
  57. var no = "1";
  58. if(no == 1)
  59. {
  60. // viewFileListNew("PUR_VENDOR", obj, document.form1.p_AttachFile1, "Y", "payment/purchase/" + obj, null, "240");
  61. viewFileListNew('PURCHASE_'+obj, "240", document.form1.p_AttachFile1, "Y", "payment/purchase/"+obj.value);
  62. }
  63. });
  64. $("#btn_list").click(function(){
  65. $("#fevent").val("");
  66. $("#form1").attr("action", "/payment/purchase/VendorPrintCheckList.screen");
  67. $("#form1").attr("target", "_self");
  68. $("#form1").attr("method", "post");
  69. $("#form1").submit();
  70. });
  71. $("#btn_return").click(function(){
  72. $("#fevent").val("CON_RETURN");
  73. var url = "/payment/purchase/VendorPrintCheckReturnPop.screen";
  74. var win_id = "_returnPop";
  75. url += "?pop_win_id="+win_id;
  76. url += "&payreqId="+$("#payreqId").val();
  77. fLayerPop(win_id, url, 550,130, '', '', 'NO');
  78. });
  79. $("#btn_confim").click(function(){
  80. var f = document.form1;
  81. if(confirm("승인 하시겠습니까?"))
  82. {
  83. $("fevent").val("SAVE_DATA");
  84. $("#status").val("60");
  85. submitXmlRequest("/payment/purchase/VendorPrintCheck_form.screen", "SAVE_DATA", f);
  86. }
  87. });
  88. $("#btn_save").click(function(){
  89. var status = "<%=prePayment.get("VP_STATUS")%>";
  90. var f = document.form1;
  91. var VP_END_DY = jQuery("#VP_END_DY").val();
  92. var VP_DESC = jQuery("#VP_DESC").val();
  93. if(VP_END_DY == ""){
  94. alert("검토일자를 입력해주세요");
  95. jQuery("#VP_END_DY").focus();
  96. return;
  97. }
  98. if(VP_DESC == ""){
  99. alert("검토항목를 입력해주세요");
  100. jQuery("#VP_DESC").focus();
  101. return;
  102. }
  103. if(confirm("저장 하시겠습니까?"))
  104. {
  105. $("fevent").val("SAVE_DATA");
  106. $("#status").val("40");
  107. submitXmlRequest("/payment/purchase/VendorPrintCheck_form.screen", "SAVE_DATA", f);
  108. }
  109. });
  110. });
  111. function doResult(resultObj)
  112. {
  113. try
  114. {
  115. if( resultObj.getRequestEvent() == "SAVE_DATA")
  116. {
  117. if($("#fevent").val() == "CON_RETURN")
  118. {
  119. var url = "/payment/purchase/VendorPrintCheckReturnPop.screen";
  120. var win_id = "_returnPop";
  121. url += "?pop_win_id="+win_id;
  122. url += "&payreqId="+$("#payreqId").val();
  123. fLayerPop(win_id, url, 550,130, '', '', 'NO');
  124. }
  125. else
  126. {
  127. if( resultObj.getSuccess() )
  128. {
  129. alert("저장되었습니다.");
  130. document.form1.isSubmit = false;
  131. $("#fevent").val("GET_DETAIL");
  132. $("#form1").attr("action", "/payment/purchase/VendorPrintCheck.screen");
  133. $("#form1").attr("target", "_self");
  134. $("#form1").attr("method", "post");
  135. $("#form1").submit();
  136. // $("#btn_list").click();
  137. }
  138. else
  139. {
  140. // dlgErrorMsg(resultObj.getMessage);
  141. alert(resultObj.getValueObject().get("errMsg"));
  142. document.form1.isSubmit = false;
  143. }
  144. }
  145. }
  146. }
  147. catch(errorObject) {
  148. showErrorDlg("doResult()", errorObject);
  149. }
  150. }
  151. function SearchUser(NAME,CODE,DEPT_YN){
  152. CODE = "";
  153. NAME = "";
  154. GB = "PUREMP";
  155. var win_id = "_searchUserPopup";
  156. var link = "/lib/dlgSearchUserPop.screen";
  157. link += "?pop_win_id="+win_id;
  158. link += "&NAME="+NAME;
  159. link += "&CODE="+CODE;
  160. link += "&GB="+GB;
  161. if(DEPT_YN == "Y")
  162. link += "&deptNameYn=purchase";
  163. fLayerPop(win_id, link, 700,400, '', '', 'NO');
  164. }
  165. function SearchUserClose(result){
  166. jQuery("#VP_CHK_EMPNO").val(result[9])//ACCT_ID
  167. jQuery("#VP_CHK_EMPNM").val(result[1])//이름
  168. jQuery("#EPART_DEPT_NAME").val(result[3])//부서
  169. setTimeout(function(){ fLayerPopClose('_searchUserPopup');},100);
  170. }
  171. function calendar(thisDayObj){
  172. dlgCalendar(thisDayObj);
  173. }
  174. //-->
  175. </script>
  176. <modular:search id="form1">
  177. <modular:key id="fevent" />
  178. </modular:search>
  179. <form id="form1" name="form1" method="post" modular:type="search">
  180. <INPUT type="hidden" name="fevent" id="fevent" value="">
  181. <INPUT type="hidden" name="payreqId" id="payreqId" value="<%=prePayment.get("PAYREQ_ID") %>"/> <!-- 발주계약ID -->
  182. <INPUT type="hidden" name="purContId" id="purContId" value="<%=prePayment.get("PUR_CONT_ID") %>"/> <!-- 발주계약ID -->
  183. <INPUT type="hidden" name="subContModId" id="subContModId" value="<%=prePayment.get("PUR_CONT_MOD_ID") %>"/>
  184. <INPUT type="hidden" name="dept_cd" id="dept_cd" value="<%=prePayment.get("DEPT_CD") %>"/> <!-- 현장코드 -->
  185. <INPUT type="hidden" name="lastDate" id="lastDate" value=""/>
  186. <!-- 리스트 검색조건 보존 시작-->
  187. <INPUT type='hidden' id="searchDeptCd" name="searchDeptCd" value="<%=params.get("searchDeptCd")%>"/> <!-- 현장코드 -->
  188. <INPUT type='hidden' id="searchDeptNm" name="searchDeptNm" value="<%=params.get("searchDeptNm")%>"/> <!-- 현장명 -->
  189. <INPUT type='hidden' id="searchBuildName" name="searchBuildName" value="<%=params.get("searchBuildName")%>"/> <!-- 계약명 -->
  190. <INPUT type='hidden' id="searchDateStart" name="searchDateStart" value="<%=params.get("searchDateStart")%>"/> <!-- 작성 시작일 -->
  191. <INPUT type='hidden' id="searchDateEnd" name="searchDateEnd" value="<%=params.get("searchDateEnd")%>"/> <!-- 작성 종료일 -->
  192. <INPUT type='hidden' id="searchStatusCd" name="searchStatusCd" value="<%=params.get("searchStatusCd")%>"/> <!-- 상태값 -->
  193. <!-- 리스트 검색조건 보존 종료-->
  194. <input type='hidden' id="status" name="status" value=""/> <!-- 상태값 -->
  195. <table border="0" cellspacing="0" cellpadding="0" style="width: 100%;">
  196. <tr>
  197. <td style="text-align: left;">
  198. <div align="left" id="title" style="float: left;">
  199. <ul>
  200. <li>Vendor Print 검토 상세(<%= prePayment.get("VP_STATUS_NM") %>)</li>
  201. <li>
  202. </ul>
  203. </div>
  204. </td>
  205. <td style="text-align: right; vertical-align: bottom;">
  206. <span class="btnSearch center" id="btn_save_area"><a href="javascript:void(0);" id="btn_save">저장</a></span>
  207. <span class="btnSearch center" id="btn_confim_area"><a href="javascript:void(0);" id="btn_confim">승인</a></span>
  208. <span class="btnSearch center" id="btn_return_area"><a href="javascript:void(0);" id="btn_return">반려</a></span>
  209. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
  210. </td>
  211. </tr>
  212. </table>
  213. <div class="application-info magT10">
  214. <div class="application-sub-title">
  215. <span class="title">계약정보</span>
  216. </div>
  217. <div class="application-location"></div>
  218. </div>
  219. <TABLE class="form-table">
  220. <colgroup>
  221. <col width="13%" />
  222. <col width="20%" />
  223. <col width="13%" />
  224. <col width="20%" />
  225. <col width="13%" />
  226. <col width="*" />
  227. </colgroup>
  228. <TR height="25">
  229. <th style="text-align: left;">현장명</th>
  230. <TD><%= prePayment.get("DEPT_NAME") %></TD>
  231. <th style="text-align: left;">계약명</th>
  232. <TD><%= prePayment.get("CST_DOC_NAME") %></TD>
  233. <th style="text-align: left;">통화</th>
  234. <TD><%= prePayment.get("CURRENCY_GB") %></TD>
  235. </TR>
  236. <TR>
  237. <th style="text-align: left;">사업자번호</th>
  238. <TD><%= prePayment.get("VENDCD") %></TD>
  239. <th style="text-align: left;">계약업체명</th>
  240. <TD><%= prePayment.get("MEMBER_NAME") %></TD>
  241. <th style="text-align: left;">대표이사</th>
  242. <TD><%= prePayment.get("BOSS_NAME") %></TD>
  243. </TR>
  244. <TR>
  245. <th style="text-align: left;">계약기간</th>
  246. <TD><%= prePayment.get("ORD_START_END_DATE") %></TD>
  247. <th style="text-align: left;">계약금액</th>
  248. <TD><%= Formatter2.currency(prePayment.get("ORD_AMT"), intDigit)%> (부가세 별도)</TD>
  249. <th style="text-align: left;">선급금액</th>
  250. <TD><%= Formatter2.currency(prePayment.get("PREPAY_SUPPLY_AMT"), intDigit)%> (부가세 별도)</TD>
  251. </TR>
  252. <TR height="55">
  253. <th style="text-align: left;">대금지불방법</th>
  254. <TD colspan="5"><%=prePayment.get("DDD") %></TD>
  255. </TR>
  256. </TABLE>
  257. <!-- 대금정보 시작 -->
  258. <div class="application-info magT10">
  259. <div class="application-sub-title">
  260. <span class="title">대금정보</span>
  261. </div>
  262. <div class="application-location"></div>
  263. </div>
  264. <table class="form-table">
  265. <colgroup>
  266. <col width="13%" />
  267. <col width="20%" />
  268. <col width="13%" />
  269. <col width="20%" />
  270. <col width="13%" />
  271. <col width="*" />
  272. </colgroup>
  273. <tr height="25">
  274. <th style="text-align: left;">대금구분</th>
  275. <td><%=prePayment.get("PAY_DIV") %></TD>
  276. <th style="text-align: left;">지급구분/차수</th>
  277. <td><%=prePayment.get("DEPOSIT_NM") %> / <%= Integer.parseInt(prePayment.get("DEPOSIT_SEQ")) %> 회차</TD>
  278. <th style="text-align: left;">업체신청일시</th>
  279. <td><%= prePayment.get("CUST_SIGN_DATE") %></TD>
  280. </tr>
  281. </table>
  282. <!-- 첨부 -->
  283. <div class="application-info magT10">
  284. <div class="application-sub-title">
  285. <span class="title">첨부 및 기타서류</span>
  286. </div>
  287. <div class="application-location">
  288. </div>
  289. </div>
  290. <table class="form-table">
  291. <colgroup>
  292. <col width="13%" />
  293. <col width="*" />
  294. </colgroup>
  295. <tr height="25">
  296. <th>
  297. 첨부파일
  298. </th>
  299. <td>
  300. <textarea name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get("PURCHASE_"+ prePayment.get("PAYREQ_ID")) %></textarea>
  301. <img id="search_spot_button" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:hand; vertical-align: middle; margin-bottom: 20px; cursor: pointer;'>
  302. </td>
  303. </tr>
  304. </table>
  305. <!-- Vendor Print -->
  306. <div class="application-info magT10">
  307. <div class="application-sub-title">
  308. <span class="title">Vendor Print</span>
  309. </div>
  310. <div class="application-location">
  311. </div>
  312. </div>
  313. <table class="form-table">
  314. <colgroup>
  315. <col width="13%" />
  316. <col width="20%" />
  317. <col width="13%" />
  318. <col width="20%" />
  319. <col width="13%" />
  320. <col width="*" />
  321. </colgroup>
  322. <tr height="25">
  323. <th style="text-align: left;">검토부서</th>
  324. <td>
  325. <%= InputText.get("EPART_DEPT_NAME", prePayment.get("EPART_DEPT_NAME"), 48, 60, "desc=검토부서, readOnly") %>
  326. </TD>
  327. <th style="text-align: left;">검토자</th>
  328. <TD>
  329. <INPUT type='hidden' name="VP_CHK_EMPNO" value="<%=prePayment.get("VP_CHK_EMPNO")%>">
  330. <%= InputText.get("VP_CHK_EMPNM", prePayment.get("VP_CHK_EMPNM"), 21, 60, "desc=검토자, readOnly") %>
  331. <IMG id=btnevalemp src="/img/buyer/button/bt_search_right.gif" alt="검토자" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:SearchUser('<%=prePayment.get("VP_CHK_EMPNM")%>','<%=prePayment.get("VP_CHK_EMPNO")%>','N');">
  332. </TD>
  333. <th style="text-align: left;">검토일자</th>
  334. <td>
  335. <%= InputText.get("VP_END_DY", Formatter2.formatDate(prePayment.get("VP_END_DY"), "-"), 40, 30, "class=input_blank, readOnly=white, string, left, perSize, tabIndex=-1", "string") %>
  336. <A href="JavaScript:calendar('VP_END_DY');"><IMG src="/img/supplier/template/bt_calender.gif" alt="달력" border="0" align="absmiddle"></A>
  337. </TD>
  338. </tr>
  339. <tr height="25">
  340. <th style="text-align: left;">검토항목</th>
  341. <td colspan="3">
  342. <%= InputText.get("VP_DESC", prePayment.get("VP_DESC"), 98, 1000, "string, left, perSize", "string") %>
  343. </TD>
  344. <th style="text-align: left;">상태</th>
  345. <td><%= prePayment.get("VP_STATUS_NM") %></TD>
  346. </tr>
  347. <tr height="25" id="return_reson_area">
  348. <th style="text-align: left;">반려사유</th>
  349. <td colspan="5"><%= prePayment.get("VP_RTN_REASON") %></TD>
  350. </tr>
  351. <tr height="25">
  352. <th>의견</th>
  353. <td colspan="5">
  354. <textarea name="opinion" id="opinion" style="width:98%; height:70px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget"><%=prePayment.get("VP_OPINION") %></textarea>
  355. </td>
  356. </tr>
  357. </table>
  358. </form>