OutEstmWriteView.jsp 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.08.11
  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="com.udapsoft.waf.common.util.StringUtils" %>
  12. <%@ page import="kr.co.udapsoft.common.code.*" %>
  13. <%@ page import="kr.co.hsnc.common.util.*"%>
  14. <%@ page import="kr.co.hsnc.common.sql.*" %>
  15. <%@ include file="/jsp/work/taglib.jsp" %>
  16. <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
  17. <%
  18. ctx.init(request, response);
  19. HandlerStorage storage = ctx.getHandlerStorage();
  20. ValueObject params = storage.getParams();
  21. ValueObject user = storage.getUser();
  22. ValueObject Order = storage.getValueObject("Order");
  23. ValueObject file = storage.getValueObject(Order.get("FILE_GB"));
  24. %>
  25. <!-- <script language="javascript" src="/js/crosscert/init.js"></script> -->
  26. <SCRIPT language="JavaScript">
  27. /*예약함수*/
  28. var sheet1 = new ibsheetObject();
  29. var sheet1Row;
  30. var sheet1PageNo = 1;
  31. var pageLastRowIndex = 1;
  32. var validationResult = false;
  33. var filterShow = false;
  34. function _onReady(){
  35. gridInit(sheet1);
  36. autoResize();
  37. var info = [{StdCol:"DEPTH1" , SumCols:"7|8|9|10|11",CaptionText:"[소 계]",CaptionCol:3}];
  38. sheet1.ShowSubSum (info);
  39. sheet1.SetSumValue(3,"총 공 사 비");
  40. /**
  41. * Application Initialize
  42. */
  43. $("#btn_back").click(function() {
  44. $("#fevent").val("FORM_SELECT");
  45. $("#form1").attr("action", "/portal/bid/SuppBidResult.screen");
  46. $("#form1").attr("target", "_self");
  47. $("#form1").attr("method", "post");
  48. $("#form1").submit();
  49. });
  50. jQuery("#btnExcel").click(function(){
  51. var params = { FileName : "견적내역(부가세별도).xls", SheetName : "견적내역(부가세별도)", SheetDesign:1 , DownCols:"DEPTH1|DEPTH2|ITEM_NAME|UNIT_COST|NOTI" } ;
  52. sheet1.Down2Excel(params);
  53. });
  54. doSearchSheet();
  55. }
  56. function doSearchSheet(){
  57. $("#fevent").val("GET_ITEM_LIST");
  58. var url = Modular.model.PageContext.CONTEXT_ROOT + "/portal/bid/OutEstmWriteView_sheet.screen";
  59. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  60. }
  61. function gridInit(sheetName){
  62. var init_sheet = {};
  63. init_sheet.Cfg = {SearchMode:0 , MergeSheet:msHeaderOnly+msPrevColumnMerge};
  64. init_sheet.Cols = [
  65. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  66. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center" , Hidden:"True"},
  67. {Header:'구분', Type:"Text", SaveName:"DEPTH1", Width:40, Align:"left", Edit:false},
  68. {Header:'구분', Type:"Text", SaveName:"ITEM_NAME", Width:140, Align:"left", Edit:false},
  69. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  70. {Header:'MATERIAL_CD', Type:"Text", SaveName:"MATERIAL_CD", Width:0, Align:"Center", Hidden:"True"},
  71. {Header:'PARENT_LEVEL', Type:"Text", SaveName:"PARENT_LEVEL", Width:0, Align:"left", Hidden:"True"},
  72. {Header:'수량/규격', Type:"Text", SaveName:"ITEMS", Width:0, Align:"Center", Hidden:"True"},
  73. {Header:'재료비', Type:"AutoSum", SaveName:"MAT_COST", Width:60, Align:"right", PointCount:<%=Order.get("PointCount")%>},
  74. {Header:'노무비', Type:"AutoSum", SaveName:"LAB_COST", Width:60, Align:"right", PointCount:<%=Order.get("PointCount")%>},
  75. {Header:'경비', Type:"AutoSum", SaveName:"UNIT_COST", Width:60, Align:"right", PointCount:<%=Order.get("PointCount")%>},
  76. {Header:'합계', Type:"AutoSum", SaveName:"COST_SUM", Width:60, Align:"right", CalcLogic:"|MAT_COST|+|LAB_COST|+|UNIT_COST|", PointCount:<%=Order.get("PointCount")%>},
  77. {Header:'산출근거', Type:"Text", SaveName:"BASIS_CALCU", Widtd:280, Align:"left", Edit:false},
  78. {Header:'비고', Type:"Text", SaveName:"NOTI", Width:100, Align:"left"},
  79. {Header:'수량', Type:"Text", SaveName:"QTY", Width:0, Align:"left", Hidden:"True"},
  80. {Header:'합계', Type:"Text", SaveName:"ROW_SUM_AMT", Width:0, Align:"left", Hidden:"True"}
  81. ];
  82. init_sheet.HeaderMode = {Sort:1};
  83. IBS_InitSheet(sheetName, init_sheet);
  84. sheetName.SetDataAutoTrim(0);
  85. sheetName.SetEditable(false);
  86. setGridSize();
  87. }
  88. /**
  89. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  90. */
  91. function sheet1_OnSearchEnd(code, message) {
  92. if(code == 0) {
  93. var row = sheet1.RowCount();
  94. sheet1.RowDelete(row);
  95. sheet1.RowDelete(row-2);
  96. sheet1.RowDelete(row-4);
  97. sheet1.SetMergeCell(row-3,2,1,2);//타이틀 머지
  98. sheet1.SetMergeCell(row-4,2,1,2);
  99. sheet1.SetMergeCell(row-5,2,1,2);
  100. sheet1.FitColWidth();
  101. //크롬 문제
  102. if(sheet1.GetSheetWidth() > 450){
  103. sheet1.SetSheetWidth(450);
  104. sheet1.SetSheetWidth($("#sheettable").width());
  105. sheet1.FitColWidth();
  106. }
  107. } else {
  108. //조회 에러 수행
  109. alert(message);
  110. }
  111. }
  112. /**
  113. * IBSheet Event: Click
  114. */
  115. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  116. //alert("Row :" + Row + " Col : " +Col);
  117. if(Row == 1){
  118. // exceldown();
  119. }
  120. }
  121. /**
  122. * IBSheet size setting
  123. */
  124. function setGridSize() {
  125. sheet1.FitColWidth();
  126. }
  127. function numberFormat(num) {
  128. var pattern = /(-?[0-9]+)([0-9]{3})/;
  129. while(pattern.test(num)) {
  130. num = num.replace(pattern,"$1,$2");
  131. }
  132. return num;
  133. }
  134. //첨부파일
  135. function doAttachFile(obj) {
  136. if(obj==''){
  137. alert("After you have saved, you can attach a file.");
  138. }else if(obj != ''){
  139. viewFileListNew("<%=Order.get("FILE_GB")%>", obj.value, document.form1.p_AttachFile, "N", "bid/outside/<%=Order.get("BID_NO")%>/<%=Order.get("VENDOR_CD")%>/");
  140. }
  141. }
  142. function doResult(resultObj) {
  143. try {
  144. if( resultObj.getRequestEvent() == "FORM_UPDATE") {
  145. if( resultObj.getSuccess() ) {
  146. alert("저장 되었습니다.");
  147. history.back();
  148. }
  149. else {
  150. dlgErrorMsg(resultObj);
  151. }
  152. }
  153. if( resultObj.getRequestEvent() == "FORM_DELETE") {
  154. if( resultObj.getSuccess() ) {
  155. alert("삭제 되었습니다.");
  156. $("#btn_list").click();
  157. }
  158. else {
  159. dlgErrorMsg(resultObj);
  160. }
  161. }
  162. } catch(errorObject) {
  163. showErrorDlg("doResult()", errorObject);
  164. }
  165. }
  166. function sheet1_OnSmartResize(Width, Height) {
  167. sheet1.FitColWidth();
  168. autoResize();
  169. }
  170. function autoResize(){
  171. // var t1_height = document.getElementById("t1").scrollHeight + 10;
  172. // var iframeHeight= document.body.scrollHeight - t1_height;
  173. //var iframeWidth= document.body.scrollWidth;
  174. sheet1.SetSheetHeight(560);
  175. }
  176. function isEmptyVal( value ) {
  177. if(value.length == 0){
  178. return true;
  179. }
  180. if( value == "" ) {
  181. return true;
  182. }
  183. return false;
  184. }
  185. </SCRIPT>
  186. <modular:search id="form1">
  187. <modular:key id="fevent" />
  188. </modular:search>
  189. <form id="form1" name="form1" method="post" modular:type="search">
  190. <INPUT type='hidden' name="fevent" id="fevent" value="">
  191. <INPUT type='hidden' name="DEMANDED_ID" value="<%=Order.get("DEMANDED_ID")%>">
  192. <INPUT type='hidden' name="DEMANDED_KIND" value="<%=Order.get("DEMANDED_KIND")%>">
  193. <INPUT type='hidden' name="BID_NO" value="<%=Order.get("BID_NO")%>">
  194. <INPUT type='hidden' name="BID_DEG" value="<%=Order.get("BID_DEG")%>">
  195. <INPUT type='hidden' name="VENDOR_CD" value="<%=Order.get("VENDOR_CD")%>">
  196. <INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
  197. <%-- <INPUT type='hidden' name="VENDOR_CD" value="<%=user.get("CORP_ID")%>"> --%>
  198. <INPUT type='hidden' name="FILE_GB" value="<%=Order.get("FILE_GB")%>">
  199. <INPUT type='hidden' name="ATT_ID" value="<%=Order.get("ATT_ID")%>">
  200. <INPUT type='hidden' name="ESTI_SIGNDATA" value="">
  201. <INPUT type='hidden' name="sItemInfo" value="">
  202. <INPUT type='hidden' name="signeddata" value="">
  203. <table width="100%">
  204. <colgroup>
  205. <col width="*" />
  206. <col width="130" />
  207. </colgroup>
  208. <tr>
  209. <th>
  210. <div align="left" id="title" >
  211. <ul><li>제출견적보기</li></ul>
  212. </div>
  213. </th>
  214. <td align="right">
  215. <span class="btnSearch center" id="btn_back"><a href="javascript:void(0);">이전</a></span>
  216. </td>
  217. </tr>
  218. </table>
  219. <div class="application-info magT10">
  220. <div class="application-sub-title">
  221. <span class="title">입찰정보</span>
  222. </div>
  223. </div>
  224. <TABLE class="form-table">
  225. <colgroup>
  226. <col width="130"/>
  227. <col width="40%">
  228. <col width="130"/>
  229. <col width="40%">
  230. </colgroup>
  231. <TR height="25">
  232. <TH style="text-align:left"> 입찰번호-차수</TH>
  233. <TD>
  234. <%=Order.get("bid_no") %> - <%=Order.get("bid_deg") %>
  235. </TD>
  236. <TH style="text-align:left"> 온라인입찰여부</TH>
  237. <TD>
  238. <%=Order.get("ONBID_YN")%>
  239. </TD>
  240. </TR>
  241. <TR height="25">
  242. <TH style="text-align:left"> 입찰명</TH>
  243. <TD colspan="3">
  244. <%=Order.get("BID_MASTER_NM")%>
  245. </TD>
  246. </TR>
  247. <TR height="25">
  248. <TH style="text-align:left"> 견적제출기간</TH>
  249. <TD colspan="3">
  250. <%=Order.get("BID_FROM_DT")%> ~<%=Order.get("BID_TO_DT")%>
  251. </TD>
  252. </TR>
  253. <TR height="25">
  254. <TH style="text-align:left"> 통화구분</TH>
  255. <TD><%=Order.get("CURRENCY_GB_NM")%></TD>
  256. <TH style="text-align:left"> 공사기간</TH>
  257. <TD><%=Order.get("DELI_FROM_DY_NM")%> ~ <%=Order.get("DELI_TO_DY_NM")%></TD>
  258. </TR>
  259. <TR height="25">
  260. <TH style="text-align:left"> 계약이행 보증</TD>
  261. <TD><% if(!Order.get("CONTFUL_RATE").isEmpty()){%><%=Order.get("CONTFUL_RATE")%> %<%}%></TD>
  262. <TH style="text-align:left"> 하자보수 보증/기간</TD>
  263. <TD><% if(!Order.get("WARR_RATE").isEmpty()){%><%=Order.get("WARR_RATE")%>%<%}%><% if(!Order.get("CBC_DEFECT_DAY").isEmpty()){%> / &nbsp;준공일로부터 <%= Order.get("CBC_DEFECT_DAY")%> 개월<%}%></TD>
  264. </TR>
  265. <TR height="25">
  266. <TH style="text-align:left"> 지급조건</TD>
  267. <TD><%=Order.get("PAY_TERMS_CD") %></TD>
  268. <TH style="text-align:left"> 공사장소</TH>
  269. <TD><%=Order.get("DELIVERY_PLACE") %></TD>
  270. </TR>
  271. <!-- 발주의뢰정보 : 종료 -->
  272. </table>
  273. <TABLE width="100%">
  274. <colgroup>
  275. <col width="40%">
  276. <col width="60%"/>
  277. </colgroup>
  278. <tr style="height:10%"><td style="vertical-align: top;">
  279. <div class="application-info">
  280. <div class="application-sub-title">
  281. <span class="title">견적정보</span>
  282. </div>
  283. </div>
  284. <TABLE class="form-table">
  285. <colgroup>
  286. <col width="145">
  287. <col/>
  288. </colgroup>
  289. <TR height="25">
  290. <TH style="text-align:left">사업자번호</TH>
  291. <TD><%=StringUtils.getBizNo(user.get("CORP_REG_NO")) %></TD>
  292. </TR>
  293. <TR height="25">
  294. <TH style="text-align:left"> 업체명</TH>
  295. <TD><%=user.get("CORP_KOR")%></TD>
  296. </TR>
  297. <TR height="25">
  298. <TH style="text-align:left"> 견적합계금액</TH>
  299. <TD><%= InputText.get("TOT_AMT", "", 50, 300, "class=input_blank,desc=견적합계금액,readOnly=white") %></TD>
  300. </TR>
  301. </table>
  302. </TD>
  303. <TD rowspan="4" style="padding-left:5px;vertical-align: top;">
  304. <table id="sheettable" style="width:100%;height:25px;">
  305. <colgroup>
  306. <col width="*" />
  307. <col width="130" />
  308. </colgroup>
  309. <tr heigth="25">
  310. <th>
  311. <div class="application-info">
  312. <div class="application-sub-title">
  313. <span class="title">견적내역(부가세별도)</span>
  314. </div>
  315. </div>
  316. </th>
  317. <td align="right">
  318. <span class="btnSearch center" id="btnExcel"><a href="javascript:void(0);">Excel Down</a></span>
  319. </td>
  320. </tr>
  321. </table>
  322. <div id="sheet1_div" style="height: auto; min-height: 300px;width:100%; overflow: auto;height:100%">
  323. <script>createIBSheet('sheet1','500px', '590px');</script>
  324. </div>
  325. </TD>
  326. </TR>
  327. <TR style="height:500px"><TD align="top" width="*" style="vertical-align: top">
  328. <div class="application-info">
  329. <div class="application-sub-title">
  330. <span class="title">첨부파일</span>
  331. </div>
  332. </div>
  333. <TABLE class="form-table">
  334. <colgroup>
  335. <col width="145">
  336. <col/>
  337. </colgroup>
  338. <TR height="100">
  339. <TH style="text-align:left"> 첨부파일</TD>
  340. <TD>
  341. <TEXTAREA name="p_AttachFile" id="p_AttachFile" style="width:85%;height:80px" rows="1" class="input" readOnly><%=file.get(Order.get("FILE_GB")) %></TEXTAREA>
  342. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  343. </TD>
  344. </TR>
  345. </TABLE>
  346. </TD>
  347. </TR>
  348. </TABLE>
  349. </form>