BidOpen.jsp 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936
  1. <%--
  2. - Author(s) : Hyung min Son
  3. - Date : 2014.07.14
  4. - Description: 견적서 개찰(구매) 상세
  5. --%>
  6. <%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
  7. <%@ page import="java.util.*"%>
  8. <%@ page import="java.text.SimpleDateFormat" %>
  9. <%@ page import="java.util.Date" %>
  10. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  11. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  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. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  16. <%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
  17. <%@ include file="/jsp/work/taglib.jsp" %>
  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 Order = storage.getValueObject("Order");
  25. ValueObject filein = storage.getValueObject(Order.get("DOC_ETC_IN"));
  26. ValueObject fileout = storage.getValueObject(Order.get("DOC_ETC_OUT"));
  27. SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
  28. String str = sd.format(new Date());
  29. boolean o_reason = false;
  30. boolean p_reason = false;
  31. boolean c_reason = false;
  32. boolean m_reason = false;
  33. if(Order.get("OPEN_OPINION").length()> 0){
  34. o_reason = true;
  35. }
  36. if(Order.get("POSTPONE_REASON").length()> 0){
  37. p_reason = true;
  38. }
  39. if(Order.get("CANCEL_REASON").length()> 0){
  40. c_reason = true;
  41. }
  42. if(Order.get("MODIFY_REASON").length()> 0){
  43. m_reason = true;
  44. }
  45. boolean open_flag = false;
  46. if(Order.get("OPEN_DT").length()> 0 ){
  47. open_flag = true;
  48. }
  49. ValueObject sign_info = storage.getValueObject("SIGN_INFO");
  50. String gwurl = "http://gw.sgcenc.co.kr/";//WAFConfig.get("gw.url.address2");
  51. %>
  52. <SCRIPT language="JavaScript">
  53. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  54. /*예약함수*/
  55. var sheet1 = new ibsheetObject();
  56. var sheet2 = new ibsheetObject();
  57. var sheet3 = new ibsheetObject();
  58. var sheet1Row;
  59. var sheet1PageNo = 1;
  60. var pageLastRowIndex = 1;
  61. var validationResult = false;
  62. var filterShow = false;
  63. var must_msg = "(은)는 필수 입력 항목입니다.";
  64. function _onReady(){
  65. /**
  66. * IBSheet object initialize
  67. */
  68. $("#OPEN_OPINION").hide();
  69. gridInit(sheet1);
  70. gridInit(sheet2);
  71. gridInit(sheet3);
  72. /**
  73. * Application Initialize
  74. */
  75. $("#btn_list").click(function() {
  76. $("#fevent").val("");
  77. $("#form1").attr("action", "/bid/purchase/BidOpenList.screen");
  78. $("#form1").attr("target", "_self");
  79. $("#form1").attr("method", "post");
  80. $("#form1").submit();
  81. });
  82. $("#btn_save").click(function() {//저장
  83. if(must_ck()){
  84. if (confirm("저장 하시겠습니까?")){
  85. btn_act = "to_save";
  86. jQuery("#fevent").val("SAVE_SHEET");
  87. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidOpen_sheet.screen";
  88. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  89. }
  90. }
  91. });
  92. $("#btn_BidOpen").click(function() {
  93. if(must_ck()){
  94. if (confirm("개찰 하시겠습니까?")){
  95. btn_act = "to_BidOpen";
  96. jQuery("#fevent").val("SAVE_SHEET");
  97. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidOpen_sheet.screen";
  98. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  99. }
  100. }
  101. });
  102. $("#btn_BidOpi").click(function() {
  103. var win_id = "_OpenPop";
  104. var link = "/bid/purchase/BidOpenPop.screen";
  105. link += "?pop_win_id="+win_id;
  106. link += "&BID_NO="+$("#BID_NO").val();
  107. link += "&BID_DEG="+$("#BID_DEG").val();
  108. link += "&DEMANDED_ID="+$("#DEMANDED_ID").val();
  109. link += "&TBE_STATUS_CD="+$("#TBE_STATUS_CD").val();
  110. link += "&TBE_FLAG="+$("#TBE_FLAG").val();
  111. link += "&OPEN_OPINION="+encodeURI(encodeURIComponent($("#OPEN_OPINION").val()),"UTF-8");
  112. fLayerPop(win_id, link, 600,210, '', '', 'NO');
  113. });
  114. if("<%=Order.get("PBC_DEFECT_CONDI2")%>"!=""||"<%=Order.get("CBC_DEFECT_DAY2")%>"!=""||"<%=Order.get("CBC_DERECT_TERM_CD2")%>"!=""){
  115. $("#addGuar").attr("checked", true);
  116. $(".checkAdd").show();
  117. }
  118. //보고자 조회
  119. doSearchSheet3();
  120. //개찰의견 팝업
  121. openPop();
  122. }
  123. function must_ck(){
  124. var rowcnt = sheet1.RowCount();
  125. if(rowcnt > 0){
  126. for(var r=0; r < rowcnt; r++)
  127. {
  128. var currency_gb = sheet1.GetCellValue(r+1,"CURRENCY_GB");
  129. var exchange = sheet1.GetCellValue(r+1,"EXCHANGE");
  130. if(currency_gb != "KRW" && exchange == 0 ){
  131. alert("외화인 경우 예상환율을 적용하십시요.");
  132. return false;
  133. }
  134. }
  135. }
  136. return true;
  137. }
  138. function PopClose(win_id,result){
  139. if( result != null ){
  140. if(result[0] == 0){
  141. setTimeout(function(){fLayerPopClose(win_id); },100);
  142. alert(result[1]);
  143. $("#OPEN_OPINION").val(result[2]);
  144. //$("#btn_list").click();
  145. }
  146. }else{
  147. setTimeout(function(){ fLayerPopClose(win_id); },100);
  148. }
  149. }
  150. function openPop(){
  151. <%if(Order.get("OPEN_OPINION").length() > 0 ) {%>
  152. $("#btn_BidOpi").click();
  153. <%}%>
  154. }
  155. function doSearchSheet(){
  156. $("#fevent").val("GET_CORP_LIST");
  157. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidOpen_sheet.screen";
  158. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  159. }
  160. function doSearchSheetitem(){
  161. $("#fevent").val("GET_ITEM_LIST");
  162. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidIng_sheet.screen";
  163. Modular.view.IBSheet7.doSearch(sheet2, url, jQuery("#form1"), 30, "");
  164. }
  165. function doSearchSheet3(){
  166. $("#fevent").val("GET_REPORT_EMP_LIST");
  167. var url = Modular.model.PageContext.CONTEXT_ROOT + "/bid/purchase/BidPlan_sheet.screen";
  168. Modular.view.IBSheet7.doSearch(sheet3, url, jQuery("#form1"), 30, "");
  169. }
  170. /**
  171. * IBSheet object initialize
  172. */
  173. function gridInit(sheetName){
  174. var init_sheet = {};
  175. if(sheetName.id == "sheet1"){
  176. init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly};
  177. init_sheet.Cols = [
  178. {Header:'삭제', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  179. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  180. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  181. {Header:'추천부서', Type:"Text", SaveName:"RECM_DEPT_NM", Width:100, Align:"Center", Edit:false},
  182. {Header:'사업자번호', Type:"Text", SaveName:"VENDOR_NO", Width:0, Align:"Center", Format:"SaupNo", Edit:false},
  183. {Header:'업체명', Type:"Text", SaveName:"VENDOR_NAME", Width:80, Align:"Left", Edit:false},
  184. {Header:'대표자명', Type:"Text", SaveName:"REPRE_NO", Width:60, Align:"Center", Edit:false},
  185. {Header:'담당자명', Type:"Text", SaveName:"CHARGE_NAME", Width:60, Align:"Center", Edit:false},
  186. {Header:'핸드폰', Type:"Text", SaveName:"CHAGE_HP", Width:80, Align:"Center", Edit:false},
  187. {Header:'이메일', Type:"Text", SaveName:"CHARGE_EMAIL", Width:100, Align:"Left", Edit:false},
  188. {Header:'기술검토(TBE)', Type:"Text", SaveName:"TBE_STATUS_NM", Width:60, Align:"Center", Edit:false},
  189. {Header:'견적제출시간', Type:"Text", SaveName:"SIGN_DT", Width:100, Align:"Center", Cursor:"pointer", Edit:false},
  190. {Header:'통화', Type:"Text", SaveName:"CURRENCY_GB", Width:60, Align:"Center", Edit:false},
  191. {Header:'예상환율', Type:"Float", SaveName:"EXCHANGE", Width:60, Align:"Right" <%if(open_flag){%>, Edit:false<%}%>},
  192. <%if(open_flag){%>
  193. {Header:'견적금액', Type:"Text", SaveName:"ESTI_TOT_AMT", Width:100, Align:"Right",FontColor:"Blue" , Cursor:"pointer", Edit:false},
  194. <%}%>
  195. {Header:'VENDOR_CD', Type:"Text", SaveName:"VENDOR_CD", Width:100, Align:"Center", Hidden:"True"},
  196. {Header:'RNNC_REASON', Type:"Text", SaveName:"RNNC_REASON", Width:100, Align:"Center", Hidden:"True"},
  197. {Header:'BID_RNNC_NM', Type:"Text", SaveName:"BID_RNNC_NM", Width:100, Align:"Center", Hidden:"True"},
  198. {Header:'BID_RNNC_DT', Type:"Text", SaveName:"BID_RNNC_DT", Width:100, Align:"Center", Hidden:"True"},
  199. {Header:'FILE_GB', Type:"Text", SaveName:"FILE_GB", Width:100, Align:"Center", Hidden:"True"}
  200. ];
  201. }else if(sheetName.id == "sheet2"){
  202. init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly};
  203. init_sheet.Cols = [
  204. {Header:'Del', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  205. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  206. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  207. {Header:'자재코드|자재코드', Type:"Text", SaveName:"MATERIAL_CD", Width:60, Align:"Center"},
  208. {Header:'자재명|자재명', Type:"Text", SaveName:"MATERIAL_NAME", Width:220, Align:"Left"},
  209. {Header:'규격|규격', Type:"Text", SaveName:"STD", Width:70, Align:"Left"},
  210. {Header:'단위|단위', Type:"Text", SaveName:"UNIT_KIND", Width:30, Align:"Center"},
  211. {Header:'도급|단가', Type:"Float", SaveName:"CONT_UNIT_AMT", Width:50, Align:"Right"},
  212. {Header:'도급|금액', Type:"Float", SaveName:"CONT_AMT", Width:50, Align:"Right", CalcLogic:"|CONT_UNIT_AMT|*|DEMANDED_QTY|"},
  213. {Header:'실행|단가', Type:"Float", SaveName:"ACT_UNIT_AMT", Width:50, Align:"Right"},
  214. {Header:'실행|금액', Type:"Float", SaveName:"ACT_AMT", Width:50, Align:"Right", CalcLogic:"|ACT_UNIT_AMT|*|DEMANDED_QTY|"},
  215. {Header:'견적의뢰수량|견적의뢰수량', Type:"Float", SaveName:"DEMANDED_QTY", Width:40, Align:"Right"},
  216. {Header:'투입요청일|투입요청일', Type:"Text", SaveName:"REQUEST_DATE", Width:40, Align:"Center", Format:"####-##-##"}
  217. ];
  218. sheetName.SetEditable(false);
  219. }else{
  220. init_sheet.Cfg = {SearchMode:2, Page:30,MergeSheet:msHeaderOnly,SizeMode:1};
  221. init_sheet.Cols = [
  222. {Header:'삭제', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center", Hidden:"True"},
  223. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  224. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  225. {Header:'계정ID', Type:"Text", SaveName:"ACCT_ID", Width:0, Align:"Center", Hidden:"True"},
  226. {Header:'이름', Type:"Text", SaveName:"USER_NAME", Width:100, Align:"Center", Edit:false},
  227. {Header:'부서명', Type:"Text", SaveName:"BUSEO_NAME", Width:150, Align:"Left", Edit:false},
  228. {Header:'직위명', Type:"Text", SaveName:"GRADE_NAME", Width:100, Align:"Center", Edit:false}
  229. ];
  230. }
  231. init_sheet.HeaderMode = {Sort:1};
  232. IBS_InitSheet(sheetName, init_sheet);
  233. sheetName.SetDataAutoTrim(0);
  234. //sheetName.SetEditable(false);
  235. setGridSize();
  236. }
  237. /**
  238. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  239. */
  240. function sheet1_OnSearchEnd(code, message) {
  241. var fevent = $("#fevent").val();
  242. if(code == 0) {
  243. if("GET_CORP_LIST" == fevent)
  244. doSearchSheetitem();
  245. setGridSize();
  246. var rowcnt = sheet1.RowCount();
  247. if(rowcnt> 0){
  248. for(var r=0; r < rowcnt; r++)
  249. {
  250. if(sheet1.GetCellValue(r+1,"RNNC_REASON").length > 0 ){
  251. sheet1.SetCellFontColor(r+1, 10, "#0000ff");
  252. }
  253. //환율이 KRW 일 경우 환율 수정 불가
  254. if(sheet1.GetCellValue(r+1, "CURRENCY_GB") == "KRW"){
  255. sheet1.SetCellEditable(r+1 , "EXCHANGE", false);
  256. }
  257. }
  258. }
  259. } else {
  260. //조회 에러 수행
  261. alert(message);
  262. }
  263. }
  264. /**
  265. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  266. */
  267. function sheet2_OnSearchEnd(code, message) {
  268. if(code == 0) {
  269. sheet2.FitColWidth();
  270. } else {
  271. //조회 에러 수행
  272. alert(message);
  273. }
  274. }
  275. /**
  276. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  277. */
  278. function sheet3_OnSearchEnd(code, message) {
  279. if(code == 0) {
  280. //sheet3.FitColWidth();
  281. //견적대상 업체 조회
  282. doSearchSheet();
  283. } else {
  284. //조회 에러 수행
  285. alert(message);
  286. }
  287. }
  288. /**
  289. * IBSheet size setting
  290. */
  291. function setGridSize() {
  292. sheet1.FitColWidth();
  293. sheet2.FitColWidth();
  294. }
  295. //첨부파일
  296. function doAttachFile(obj,No) {
  297. if(obj==''){
  298. alert("After you have saved, you can attach a file.");
  299. }
  300. else if(obj != ''){
  301. if(No == 1){
  302. //viewFileList("<%=Order.get("DOC_ETC_IN")%>", obj.value, document.form1.p_AttachFile1, "N", "N", "N", "N");
  303. viewFileListNew('<%=Order.get("DOC_ETC_IN")%>', obj.value, document.form1.p_AttachFile1, "N", "BD-001");
  304. }else{
  305. //viewFileList("<%=Order.get("DOC_ETC_OUT")%>", obj.value, document.form1.p_AttachFile2, "N", "N", "N", "N");
  306. viewFileListNew('<%=Order.get("DOC_ETC_OUT")%>', obj.value, document.form1.p_AttachFile2, "N", "BD-001");
  307. }
  308. }
  309. }
  310. function doResult(resultObj) {
  311. try {
  312. if( resultObj.getRequestEvent() == "FORM_OPEN_SELECT") {
  313. if( resultObj.getSuccess() ) {
  314. alert("개찰 되었습니다.");
  315. $("#fevent").val("FORM_SELECT");
  316. $("#form1").attr("action", "/bid/purchase/BidOpen.screen");
  317. $("#form1").attr("target", "_self");
  318. $("#form1").attr("method", "post");
  319. $("#form1").submit();
  320. }
  321. else {
  322. dlgErrorMsg(resultObj);
  323. }
  324. }
  325. if( resultObj.getRequestEvent() == "FORM_DELETE") {
  326. if( resultObj.getSuccess() ) {
  327. alert("삭제 되었습니다.");
  328. $("#btn_list").click();
  329. }
  330. else {
  331. dlgErrorMsg(resultObj);
  332. }
  333. }
  334. } catch(errorObject) {
  335. showErrorDlg("doResult()", errorObject);
  336. }
  337. }
  338. function sheet1_OnSmartResize(Width, Height) {
  339. sheet1.FitColWidth();
  340. sheet2.FitColWidth();
  341. autoResize();
  342. }
  343. function autoResize(){
  344. sheet1.SetSheetHeight(160);
  345. sheet2.SetSheetHeight(250);
  346. }
  347. /**
  348. * IBSheet Event: Click
  349. */
  350. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  351. if(Row == 0)return;
  352. if (Col == 11) {//견적 제출 시간
  353. if(sheet1.GetCellValue(Row,"RNNC_REASON").length > 0){
  354. var win_id = "_BidGiveupPop";
  355. var link = "/bid/purchase/BidGiveupPop.screen";
  356. link += "?pop_win_id="+win_id;
  357. link += "&VENDOR_CD="+$("#VENDOR_CD").val();
  358. link += "&BID_NO="+$("#BID_NO").val();
  359. link += "&BID_DEG="+$("#BID_DEG").val();
  360. link += "&ROW="+Row;
  361. fLayerPop(win_id, link, 600,210, '', '', 'NO');
  362. }
  363. }else if( Col == 14){//견적금액
  364. if(Value != 0 || Value == "단가계약"){
  365. if(sheet1.GetCellValue(Row,"RNNC_REASON").length == 0){
  366. var win_id = "_BidAmtPop";
  367. var link = "/bid/purchase/BidAmtPop.screen";
  368. link += "?pop_win_id="+win_id;
  369. link += "&ROW="+Row;
  370. link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
  371. link += "&BID_NO="+$("#BID_NO").val();
  372. link += "&BID_DEG="+$("#BID_DEG").val();
  373. link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
  374. link += "&DEMANDED_ID="+$("#DEMANDED_ID").val();
  375. link += "&DIV_PO_YN="+$("#DIV_PO_YN").val();
  376. //fLayerPop(win_id, link, 1200,720, '', '', 'NO');
  377. window.open(link,win_id,"toolbar=no, width=1000, height=600, top=50, left=40, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
  378. }
  379. }
  380. }
  381. }
  382. function sheet1_OnSaveEnd(code, msg)
  383. {
  384. var event = $("#fevent").val();
  385. if(event == "FORM_OPEN_SELECT"){
  386. if(code>= "0"){
  387. alert("개찰 되었습니다.");
  388. $("#fevent").val("FORM_SELECT");
  389. $("#form1").attr("action", "/bid/purchase/BidOpen.screen");
  390. $("#form1").attr("target", "_self");
  391. $("#form1").attr("method", "post");
  392. $("#form1").submit();
  393. }else{
  394. alert("에러가 발생하였습니다.");
  395. }
  396. } else if(event == "SAVE_SHEET"){
  397. if(code>= "0"){
  398. if(btn_act == "to_BidOpen"){
  399. $("#fevent").val("FORM_OPEN_SELECT");
  400. var f = document.form1;
  401. submitXmlRequest("/bid/purchase/BidOpen_form.screen", "FORM_OPEN_SELECT", f);
  402. } else {
  403. alert("저장되었습니다.");
  404. $("#fevent").val("FORM_SELECT");
  405. $("#form1").attr("action", "/bid/purchase/BidOpen.screen");
  406. $("#form1").attr("target", "_self");
  407. $("#form1").attr("method", "post");
  408. $("#form1").submit();
  409. }
  410. }else{
  411. alert("에러가 발생하였습니다.");
  412. }
  413. }
  414. }
  415. function doSignFile(doc_id){
  416. //alert(doc_id);
  417. if(doc_id == ""){
  418. alert("결재 정보가 없습니다.");
  419. return;
  420. }
  421. var doc_chk = doc_id.substring(doc_id.length-3, doc_id.length);
  422. doc_chk = doc_chk * 1;
  423. var link = "";
  424. var year = "<%=sign_info.get("year") %>";
  425. if (year > "20151213") {
  426. link = "<%=gwurl%>upload_approval/TEC/doc/" + year.substr(0,4) + "/" + doc_chk + "/"+ doc_id+".mht";
  427. }
  428. else{
  429. link = "<%=gwurl%>upload_approval/TEC/doc/" + doc_chk + "/"+ doc_id+".mht";
  430. }
  431. //var popOption = "width=400, height=450, resizable=no, scrollbars=auto, status=no;"; //팝업창 옵션(optoin)
  432. window.open(link,"_viewDraft","");
  433. }
  434. //setInterval("dpTime()",1000);
  435. </SCRIPT>
  436. <modular:search id="form1">
  437. <modular:key id="event" />
  438. </modular:search>
  439. <form id="form1" name="form1" method="post" modular:type="search">
  440. <INPUT type='hidden' name="fevent" id="fevent" value="">
  441. <INPUT type='hidden' name="DEMANDED_ID" value="<%=Order.get("DEMANDED_ID")%>">
  442. <INPUT type='hidden' name="BID_NO" value="<%=Order.get("BID_NO")%>">
  443. <INPUT type='hidden' name="BID_DEG" value="<%=Order.get("BID_DEG")%>">
  444. <INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
  445. <INPUT type='hidden' name="SITEDESC_FLAG" value="<%=Order.get("SITEDESC_FLAG")%>">
  446. <INPUT type='hidden' name="TBE_FLAG" value="<%=Order.get("TBE_FLAG")%>">
  447. <INPUT type='hidden' name="DIV_PO_YN" value="<%=Order.get("DIV_PO_YN")%>">
  448. <INPUT type='hidden' name="TBE_STATUS_CD" value="<%=Order.get("TBE_STATUS_CD")%>">
  449. <INPUT type='hidden' name="SITEPARTI_YN" value="Y">
  450. <INPUT type='hidden' name="RNNC_REASON" value="">
  451. <!-- 제목 및 버튼 -->
  452. <table width="100%">
  453. <colgroup>
  454. <col width="500" />
  455. <col width="*" />
  456. </colgroup>
  457. <tr>
  458. <th>
  459. <div align="left" id="title">
  460. <ul><li>견적서 개찰 상세</li></ul>
  461. </div>
  462. </th>
  463. <td align="right">
  464. <%if(!open_flag){%>
  465. <span class="btnSearch center" id="btn_BidOpen"><a href="javascript:void(0);">개찰</a></span>
  466. <%} %>
  467. <span class="btnSearch center" id="btn_BidOpi"><a href="javascript:void(0);">특기사항</a></span>
  468. <span class="btnSearch center" id="btn_list"><a href="javascript:void(0);">목록</a></span>
  469. </td>
  470. </tr>
  471. </table>
  472. <%if(p_reason || m_reason || c_reason){ %>
  473. <TABLE class="form-table">
  474. <colgroup>
  475. <col width="160">
  476. <col/>
  477. </colgroup>
  478. <%if(c_reason){ %>
  479. <TR height="25">
  480. <TH>취소사유</TH>
  481. <TD style="vertical-align: top"><%=StringUtils.cvtHTML(Order.get("CANCEL_REASON"))%></TD>
  482. </TR>
  483. <%} %>
  484. <%if(p_reason){ %>
  485. <TR height="25">
  486. <TH>연기사유</TH>
  487. <TD style="vertical-align: top"><%=StringUtils.cvtHTML(Order.get("POSTPONE_REASON"))%></TD>
  488. </TR>
  489. <%} %>
  490. <%if(m_reason){ %>
  491. <TR height="25">
  492. <TH>정정사유</TH>
  493. <TD style="vertical-align: top"><%=StringUtils.cvtHTML(Order.get("MODIFY_REASON"))%></TD>
  494. </TR>
  495. <%} %>
  496. </TABLE>
  497. <%}%>
  498. <%if(!Order.get("REBID_REASON").equals("") || !Order.get("REBID_OUTREASON").equals("")){%>
  499. <div class="application-info magT10">
  500. <div class="application-sub-title">
  501. <span class="title">재입찰사유</span>
  502. </div>
  503. <div class="application-location">
  504. </div>
  505. </div>
  506. <TABLE class="form-table">
  507. <colgroup>
  508. <col width="145"/>
  509. <col width="40%" />
  510. <col width="145" />
  511. <col width="*" />
  512. </colgroup>
  513. <TR height="25">
  514. <TH>재입찰사유<br>(내부보고)</TH>
  515. <TD><%=StringUtils.cvtHTML(Order.get("REBID_REASON"))%></TD>
  516. <TH>재입찰사유<br>(외부공지)
  517. </TH>
  518. <TD><%=StringUtils.cvtHTML(Order.get("REBID_OUTREASON"))%></TD>
  519. </TR>
  520. </TABLE>
  521. <%} %>
  522. <!-- 발주의뢰정보 : 시작 -->
  523. <div class="application-info magT10">
  524. <div class="application-sub-title">
  525. <span class="title">발주의뢰정보</span>
  526. </div>
  527. </div>
  528. <TABLE class="form-table">
  529. <colgroup>
  530. <col width="160"/>
  531. <col width="23%">
  532. <col width="160"/>
  533. <col width="23%">
  534. <col width="160"/>
  535. <col/>
  536. </colgroup>
  537. <TR height="25">
  538. <TH> 현장</TH>
  539. <TD><%=Order.get("dept_nm") %></TD>
  540. <TH> 발주의뢰번호</TH>
  541. <TD><a href="javascript:doSignFile('<%=sign_info.get("doc_id") %>');"><%=Order.get("DEMANDED_NO")%></a>
  542. </TD>
  543. <TH> 발주의뢰명</TH>
  544. <TD><%=Order.get("DEMANDED_TITLE")%></TD>
  545. </TR>
  546. <TR height="25">
  547. <TH> 발주의뢰일</TH>
  548. <TD><%= Order.get("DEMANDED_DATE")%></TD>
  549. <TH> 발주의뢰부서</TH>
  550. <TD><%= Order.get("REQ_DEPT_NM")%></TD>
  551. <TH> 발주의뢰자</TH>
  552. <TD><%= Order.get("EMP_NM")%></TD>
  553. </TR>
  554. <TR height="25">
  555. <TH> 발주접수일자</TH>
  556. <TD><%=Order.get("RECEIPT_DATE") %></TD>
  557. <TH> Pay Item</TH>
  558. <TD><%= Order.get("PAY_ITEM_NM") %></TD>
  559. <TH> 구매예산 (원)</TH> <!-- 2015.02.27 구매예산추가 mklee -->
  560. <TD><%= Formatter2.currency(Order.get("PUR_AMT"),0) %></TD>
  561. </TR>
  562. <TR height="25">
  563. <TH> 도급금액 (원)</TH>
  564. <TD><%= Formatter2.currency(Order.get("CONT_AMT"),0) %></TD>
  565. <TH> 실행예산 (원)</TH>
  566. <TD><%=Formatter2.currency(Order.get("ACT_AMT"),0) %></TD>
  567. <TH> 도급대비실행율(%)</TH>
  568. <TD><%= Order.get("ACT_RATE")%></TD>
  569. </TR>
  570. <!-- 발주의뢰정보 : 종료 -->
  571. </table>
  572. <div class="application-info magT20">
  573. <div class="application-sub-title">
  574. <span class="title">입찰기본정보</span>
  575. </div>
  576. </div>
  577. <TABLE class="form-table">
  578. <colgroup>
  579. <col width="160"/>
  580. <col width="160"/>
  581. <col width="25%"/>
  582. <col width="160"/>
  583. <col/>
  584. </colgroup>
  585. <TR height="25">
  586. <TH> 입찰번호-차수</TH>
  587. <TD colspan="2"><%=Order.get("BID_NO")%>-<%=Order.get("BID_DEG")%></TD>
  588. <TH> 온라인입찰여부</TH>
  589. <TD><%=Order.get("ONBID_YN")%></TD>
  590. </TR>
  591. <TR height="25">
  592. <TH> 입찰명</TH>
  593. <TD colspan="2"><%=Order.get("BID_MASTER_NM")%></TD>
  594. <TH>단가계약여부</TH>
  595. <TD><%=Order.get("DIV_PO_YN").equals("Y") ? "예" : "아니오" %></TD>
  596. </TR>
  597. <TR height="25">
  598. <TH> 경쟁방법</TH>
  599. <TD colspan="2"><%=Order.get("CMPT_NM")%></TD>
  600. <TH> 낙찰자선정방법</TH>
  601. <TD><%=Order.get("SUCC_NM") %></TD>
  602. </TR>
  603. <!-- 발주의뢰정보 : 종료 -->
  604. </table>
  605. <div class="application-info magT20">
  606. <div class="application-sub-title">
  607. <span class="title">입찰진행</span>
  608. </div>
  609. </div>
  610. <TABLE class="form-table">
  611. <colgroup>
  612. <col width="160"/>
  613. <col width="160"/>
  614. <col width="25%"/>
  615. <col width="160"/>
  616. <col/>
  617. </colgroup>
  618. <TR height="25">
  619. <TH>업체공지일자</TH>
  620. <TD colspan="4"><%=Order.get("NOTI_DY") %></TD>
  621. </TR>
  622. <TR height="25">
  623. <TH rowspan="3"> 견적설명회 정보</TH>
  624. <TH> 여부</TH>
  625. <TD><%=Order.get("SITEDESC_FLAG")%></TD>
  626. <TH> 담당자</TH>
  627. <TD><%=Order.get("SITEDESCCHRGPRSNNM")%></TD>
  628. </TR>
  629. <TR height="25">
  630. <TH> 담당자 전화번호</TH>
  631. <TD ><%=Order.get("SITEDESCTELNO")%></TD>
  632. <TH> 일시</TH>
  633. <TD ><%=Order.get("SITEDESCDATE")%></TD>
  634. </TR>
  635. <TR height="25">
  636. <TH> 담당자 E-Mail</TH>
  637. <TD ><%=Order.get("SITEDESCEMAIL")%></TD>
  638. <TH> 장소</TH>
  639. <TD ><%=Order.get("SITEDESCPLACE")%></TD>
  640. </TR>
  641. <TR height="25">
  642. <TH rowspan="4"> 견적 의뢰</TH>
  643. <TH> 견적제출기간</TH>
  644. <TD colspan="3"><%=Order.get("BID_FROM_DT")%> ~<%=Order.get("BID_TO_DT")%> <font color='red'><b> (입찰마감)</b></font></TD>
  645. </TR>
  646. <TR height="25">
  647. <TH> 구매담당자</TH>
  648. <TD ><%=Order.get("PUREMPNM")%></TD>
  649. <TH> 구매담당자 전화번호</TH>
  650. <TD ><%=Order.get("PO_EMPNM")%></TD>
  651. </TR>
  652. <TR height="25">
  653. <TH> 개찰자</TH>
  654. <TD colspan="3"><%=Order.get("OPEN_EMPNM")%></TD>
  655. </TR>
  656. <TR height="25">
  657. <TH> 보고자</TH>
  658. <TD colspan="3">
  659. <div id="sheet3_div" style="width: 100%; height: 100%;">
  660. <script>createIBSheet('sheet3','100%', '100px');</script>
  661. </div>
  662. </TD>
  663. </TR>
  664. <TR height="25">
  665. <TH rowspan="2">기술검토(TBE)</TH>
  666. <TH> TBE 여부</TH>
  667. <TD ><%=Order.get("TBE_FLAG").equals("Y") ? "예" : "아니오"%></TD>
  668. <TH> TBE 일자</TH>
  669. <TD ><%=Order.get("SUPP_REQ_DY")%></TD>
  670. </TR>
  671. <TR height="25">
  672. <TH> TBE 심사자</TH>
  673. <TD><%=Order.get("EVAL_EMPNM")%></TD>
  674. <TH> TBE 완료일</TH>
  675. <TD><%=Order.get("TBE_FIN_DT")%></TD>
  676. </TR>
  677. </table>
  678. <div class="application-info magT20">
  679. <div class="application-sub-title">
  680. <span class="title">입찰조건</span>
  681. </div>
  682. </div>
  683. <TABLE class="form-table">
  684. <colgroup>
  685. <col width="160"/>
  686. <col width="23%">
  687. <col width="160"/>
  688. <col width="23%">
  689. <col width="160"/>
  690. <col/>
  691. </colgroup>
  692. <TR height="25">
  693. <TH>통화구분</TH>
  694. <TD><%=Order.get("CURRENCY_GB_NM") %> &nbsp&nbsp
  695. <%=Order.get("CURRENCY_GB_YN").equals("Y") ? "[업체변경가능]" : "[업체변경불가능]" %>
  696. </TD>
  697. <TH>CBE문서 TYPE</TH>
  698. <TD colspan="3">
  699. <%if(!Order.get("PBC_CBE_TYPE_CD").isEmpty()){ %><%=Order.get("PBC_CBE_TYPE_CD").equals("A") ? "A type" : "B type" %><%} %>
  700. </TD>
  701. </TR>
  702. <TR height="25">
  703. <TH>Installation</TH><!-- 설치비 포함여부 -->
  704. <TD><%=Order.get("PBC_INSTALL_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  705. <TH>Spare Parts for Commissionig</TH><!-- 시운전 포함여부 -->
  706. <TD><%=Order.get("PBC_COMMISS_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  707. <TH>Special Tool</TH><!-- 설치비 특별공구 포함여부 -->
  708. <TD><%=Order.get("PBC_SPETOOL_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  709. </TR>
  710. <TR height="25">
  711. <TH>Test & Inspection at Fabrication shop</TH><!-- 샾(공장) 검사비용 포함여부 -->
  712. <TD><%=Order.get("PBC_TEST_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  713. <TH>Documentation</TH><!-- vendor print (무조건 포함) 삭제? -->
  714. <TD><%=Order.get("PBC_DOC_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  715. <TH>Packing cost</TH><!-- 포장비용 포함여부 -->
  716. <TD><%=Order.get("PBC_PACK_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  717. </TR>
  718. <TR height="25">
  719. <TH>Inland Transportaion</TH><!-- 내륙운송비 -->
  720. <TD><%=Order.get("PBC_LANDTRAN_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %></TD>
  721. <TH>Delivery Condition</TH><!-- 인도조건 (현장도착도, 현장상차도,현장설치도, 설치시운전도) -->
  722. <TD colspan="3">
  723. <%=Order.get("DELIVERY_CONDITION_NM") %>&nbsp&nbsp <%=Order.get("DELIVERY_CONDITION_YN").equals("Y") ? "[업체변경가능]" : "[업체 변경 불가능]" %></TD>
  724. </TR>
  725. <TR height="25">
  726. <TH>OPTIONAL PRICE</TH><!-- 현장감독관 일당 & 기타일당 내역 -->
  727. <TD colspan="5">A. Supervision fee &nbsp <%=Order.get("PBC_FEE_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %>
  728. <% if(!Order.get("PBC_OPTION_COMMENT").isEmpty()){ %>&nbsp&nbsp B. <%= Order.get("PBC_OPTION_COMMENT")%> &nbsp<%=Order.get("PBC_OPTION_YN").equals("Y") ? "업체 견적내용 반영" : "업체 견적내용 미반영" %><%} %></TD>
  729. </TR>
  730. <TR height="25">
  731. <TH>Liquidated Damages</TH><!-- 지체상금 fix -->
  732. <TD colspan="5"><%if(!Order.get("CBC_DAMAGE_RATE").isEmpty()){ %><%= Order.get("CBC_DAMAGE_RATE")%>% <%=Order.get("CBC_DAMAGE_NM") %>,<%} %> <%if(!Order.get("CBC_DAMAGE_MAXRATE").isEmpty()){ %>Max <%= Order.get("CBC_DAMAGE_MAXRATE")%>%<%} %></TD>
  733. </TR>
  734. <TR height="25">
  735. <TH>선급금</TH>
  736. <TD><%if(!Order.get("CBC_FIRST_RATE").isEmpty()){ %><%=Order.get("CBC_FIRST_RATE") %>%<%} %> <%= Order.get("PBC_FIRST_CONDI")%></TD>
  737. <TH>중도금</TH>
  738. <TD><%if(!Order.get("CPC_MID_RATE").isEmpty()){ %><%= Order.get("CPC_MID_RATE")%>%<%} %> <%=Order.get("PBC_MID_CONDI")%></TD>
  739. <TH>잔금</TH>
  740. <TD><%if(!Order.get("PBC_REST_RATE").isEmpty()){ %><%= Order.get("PBC_REST_RATE") %>%<%} %> <%=Order.get("PBC_REST_CONDI")%></TD>
  741. </TR>
  742. <TR height="25">
  743. <TH>First Payment Bond</TH><!-- 선급금이행증권(yes, no) -->
  744. <TD><%if(!Order.get("PBC_FRSTGUAR_RATE").isEmpty()){ %><%= Order.get("PBC_FRSTGUAR_RATE") %>%<%} %> <%= Order.get("PBC_FRSTGUAR_CONDI")%></TD>
  745. <TH>Performance Bond</TH><!-- 계약이행증권(yes, no) -->
  746. <TD><%if(!Order.get("CONTFUL_RATE").isEmpty()){ %><%= Order.get("CONTFUL_RATE") %>%<%} %> <%=Order.get("CONTFUL_CONDI") %></TD>
  747. <TH>Guarantee Bond</TH><!-- 하자이행증권(yes, no) -->
  748. <TD><%if(!Order.get("WARR_RATE").isEmpty()){ %><%= Order.get("WARR_RATE") %>% <%} %><%= Order.get("WARR_CONDI")%></TD>
  749. </TR>
  750. <TR height="25">
  751. <TH>Guarantee Period</TH><!-- 하자보수기간 -->
  752. <TD colspan="3"><%=Order.get("PBC_DEFECT_CONDI") %> <%=Order.get("CBC_DEFECT_DAY") %>
  753. <% if(!Order.get("CBC_DERECT_TERM_NM").isEmpty()){ %><%=Order.get("CBC_DERECT_TERM_NM") %>간<%} %>
  754. <input type="checkbox" id="addGuar" style="margin-top:2px; display:none;">
  755. <span class="checkAdd" style="display:none;">&nbsp;or&nbsp;
  756. <%=Order.get("PBC_DEFECT_CONDI2") %> <%=Order.get("CBC_DEFECT_DAY2")%>
  757. <%if(Order.get("CBC_DERECT_TERM_CD2").equals("01")){%>
  758. <span>일 간 중 선도래일</span>
  759. <%}else if(Order.get("CBC_DERECT_TERM_CD2").equals("02")){%>
  760. <span>개월 간 중 선도래일</span>
  761. <%} %>
  762. </span>
  763. </TD>
  764. <TH>Delivery Period</TH><!-- 납기일 fix -->
  765. <TD><%if(!Order.get("DELI_FROM_DY").isEmpty() || !Order.get("DELI_TO_DY").isEmpty()){ %>
  766. <%=Order.get("DELI_FROM_DY") %> ~
  767. <%= Order.get("DELI_TO_DY") %><%} %>
  768. </TD>
  769. </TR>
  770. </TABLE>
  771. <TABLE class="form-table" style="margin-top: 10px">
  772. <colgroup>
  773. <col width="160"/>
  774. <col width="160"/>
  775. <col width="25%"/>
  776. <col width="160"/>
  777. <col/>
  778. </colgroup>
  779. <TR height="25">
  780. <TH>주요발주내용</TH>
  781. <TD colspan="2">
  782. <%=StringUtils.cvtHTML(Order.get("MAIN_PR_CONTENTS"))%>
  783. </TD>
  784. <TH>입찰업체선정사유</TH>
  785. <TD>
  786. <%=StringUtils.cvtHTML(Order.get("BID_SUPP_SELECT_REASON"))%>
  787. </TD>
  788. </TR>
  789. <TR height="25">
  790. <TH>특이사항 내부</TH>
  791. <TD colspan="2">
  792. <%=StringUtils.cvtHTML(Order.get("INNER_REMARKS"))%>
  793. </TD>
  794. <TH> 특이사항 외부</TH>
  795. <TD>
  796. <%=StringUtils.cvtHTML(Order.get("OUTER_REMARKS"))%>
  797. </TD>
  798. </TR>
  799. <TR height="100">
  800. <TH> 내부자료</TH>
  801. <TD colspan="2">
  802. <TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get(Order.get("DOC_ETC_IN")) %></TEXTAREA>
  803. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  804. </TD>
  805. <TH> 외부자료</TH>
  806. <TD>
  807. <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get(Order.get("DOC_ETC_OUT")) %></TEXTAREA>
  808. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.DEMANDED_ID,2);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  809. </TD>
  810. </TR>
  811. </TABLE>
  812. <table id=item_list width="100%">
  813. <colgroup>
  814. <col width="500" />
  815. <col width="*" />
  816. </colgroup>
  817. <tr>
  818. <th>
  819. <div class="application-info magT20">
  820. <div class="application-sub-title">
  821. <span class="title">견적의뢰내역</span>
  822. </div>
  823. </div>
  824. </th>
  825. <td align="right">
  826. </td>
  827. </tr>
  828. </table>
  829. <div id="sheet2_div" style="padding-top:5px;height: auto; min-height: 250px; overflow: auto;">
  830. <script>createIBSheet('sheet2','100%', '250px');</script>
  831. </div>
  832. <table width="100%">
  833. <colgroup>
  834. <col width="500" />
  835. <col width="*" />
  836. </colgroup>
  837. <tr>
  838. <th>
  839. <div class="application-info magT20">
  840. <div class="application-sub-title">
  841. <span class="title">견적대상업체</span>
  842. </div>
  843. </div>
  844. </th>
  845. <td align="right">
  846. <%-- <%if(open_flag){%>(단위: 원, 부가세별도)<%} %> --%>
  847. <%if(!open_flag){%>
  848. <span class="btnSearch center" id="btn_save"><a href="javascript:void(0);">환율저장</a></span>
  849. <%} %>
  850. </td>
  851. </tr>
  852. </table>
  853. <div id="sheet1_div" style="height:auto; min-height: 160px; overflow: auto;">
  854. <script>createIBSheet('sheet1','100%', '160px');</script>
  855. </div>
  856. <textarea name="OPEN_OPINION" id="OPEN_OPINION" style="width:98%; height:50px; overflow-y:auto" maxlength="100" class="input byteChk ctrlTarget"><%=Order.get("OPEN_OPINION")%></textarea>
  857. </form>