QuotPlan.jsp 45 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207
  1. <%--
  2. - Author(s) : Hoonseok choi
  3. - Date : 2023.01.18
  4. - Description: 견적_계획 상세
  5. --%>
  6. <%@ page contentType="text/html; charset=utf-8" %>
  7. <%@page import="kr.co.hsnc.common.config.WAFConfig"%>
  8. <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
  9. <%@ page import="com.udapsoft.waf.common.ui.*" %>
  10. <%@ page import="kr.co.udapsoft.common.code.*" %>
  11. <%@ page import="kr.co.hsnc.common.util.*"%>
  12. <%@ page import="kr.co.hsnc.common.sql.*" %>
  13. <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
  14. <%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
  15. <%@ page import="kr.co.udapsoft.common.util.Crosscert"%>
  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. ValueObject Order = storage.getValueObject("Order");
  24. ValueObject filein = storage.getValueObject("DOC_ETC_IN");
  25. ValueObject fileout = storage.getValueObject("DOC_ETC_OUT");
  26. String gwurl = "http://gw.sgcenc.co.kr/";
  27. String isModify = "";
  28. if(Order.get("quot_id").equals("")) {
  29. isModify = "false";
  30. } else {
  31. isModify = "true";
  32. }
  33. String today = DateUtil.formatDateTime(DateUtil.getToday(), "yyyyMMdd", "yyyyMMdd");
  34. //공통코드
  35. CommCodeManager commCodeManager = new CommCodeManager();
  36. InitCombo initCombo = new InitCombo();
  37. initCombo.makeComboData(commCodeManager.getCodeRowSet("QUOT_SUPP_SITEPARTI"), "NAME", "CODE");
  38. String BID_SUPP_SITEPARTI_CD = initCombo.getCode();
  39. String BID_SUPP_SITEPARTI_NM = initCombo.getCodeName();
  40. InitCombo initCombo2 = new InitCombo();
  41. initCombo2.makeComboData(commCodeManager.getCodeRowSet("QUOT_SUPP_SITEPARTI","CHG_CODE01","1"), "DETAILNM", "DETAILCD");
  42. String BID_SUPP_SITEPARTI_CD2 = initCombo2.getCode();
  43. String BID_SUPP_SITEPARTI_NM2 = initCombo2.getCodeName();
  44. %>
  45. <SCRIPT language="JavaScript">
  46. document.body.onresize = addEvent( document.body.onresize, "autoResize()");
  47. /*예약함수*/
  48. var sheet1 = new ibsheetObject();
  49. var sheet1Row;
  50. var sheet1PageNo = 1;
  51. var pageLastRowIndex = 1;
  52. var validationResult = false;
  53. var filterShow = false;
  54. var btn_act = "";
  55. var must_msg = "(은)는 필수 입력 항목입니다.";
  56. function _onReady(){
  57. /**
  58. * IBSheet object initialize
  59. */
  60. gridInit(sheet1);
  61. //견적요청,견적마감 이후에 버튼 숨김..
  62. if("<%=Order.get("STATUS_CD")%>" == "00"){
  63. $("#btn_Save").hide();
  64. $("#btn_Request").hide();
  65. $("#btn_del").hide();
  66. $("#btn_resend").hide();
  67. $("#btn_row_save").hide();
  68. $("#btn_back").hide();
  69. $("#btn_finish").hide();
  70. }else if("<%=Order.get("STATUS_CD")%>" == "01"){
  71. $("#btn_Create").text("견적복사");
  72. $("#btn_resend").hide();
  73. $("#btn_row_save").hide();
  74. $("#btn_back").hide();
  75. $("#btn_finish").hide();
  76. }else if("<%=Order.get("STATUS_CD")%>" == "02" || "<%=Order.get("STATUS_CD")%>" == "10"){
  77. $("#btn_Create").text("견적복사");
  78. $("#btn_Save").hide();
  79. $("#btn_Request").hide();
  80. $("#btn_del").hide();
  81. $("#corp_add").hide();
  82. $("#btn_row_del").hide();
  83. if("<%=Order.get("STATUS_CD")%>" == "10"){
  84. $("#btn_resend").hide();
  85. $("#btn_row_save").hide();
  86. $("#btn_back").hide();
  87. $("#btn_finish").hide();
  88. }
  89. }
  90. /**
  91. * Application Initialize
  92. */
  93. $("#sitedesc_flag_1").click(function() {
  94. $("#QUOT_SITEDESCDATE").attr("disabled",false);
  95. $("#QUOT_SITEDESCDATE_HH").attr("disabled",false);
  96. $("#QUOT_SITEDESCDATE_MI").attr("disabled",false);
  97. $("#QUOT_SITEDESCPLACE").attr("disabled",false);
  98. $("#calendar_sitedescdate").show();
  99. });
  100. $("#sitedesc_flag_2").click(function() {
  101. $("#QUOT_SITEDESCDATE").attr("disabled",true);
  102. $("#QUOT_SITEDESCDATE").val("");
  103. $("#QUOT_SITEDESCDATE_HH").attr("disabled",true);
  104. $("#QUOT_SITEDESCDATE_HH").val("");
  105. $("#QUOT_SITEDESCDATE_MI").attr("disabled",true);
  106. $("#QUOT_SITEDESCDATE_MI").val("");
  107. $("#QUOT_SITEDESCPLACE").attr("disabled",true);
  108. $("#QUOT_SITEDESCPLACE").val("");
  109. $("#calendar_sitedescdate").hide();
  110. });
  111. //라디오 박스 체크 여부 // N 일경우 비활성화
  112. if($("#sitedesc_flag_2").attr("checked") == "checked") $("#sitedesc_flag_2").click();
  113. $("#btn_list").click(function() {
  114. jQuery("#fevent").val("");
  115. jQuery("#form1").attr("action", "/quot/outside/QuotPlanList.screen");
  116. jQuery("#form1").attr("target", "_self");
  117. jQuery("#form1").attr("method", "post");
  118. jQuery("#form1").submit();
  119. });
  120. $("#btn_Create").click(function() {
  121. if(confirm("생성하시겠습니까?")){
  122. if(create_must_ck()){
  123. jQuery("#fevent").val("SAVE_QUOT_DETAIL");
  124. var f = document.form1;
  125. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "SAVE_QUOT_DETAIL", f);
  126. }
  127. }
  128. });
  129. $("#btn_Save").click(function() {
  130. var sRow = sheet1.FindStatusRow("D");
  131. if(sRow != ""){
  132. alert("저장시 업체 선택을 해지해 주십시오.");
  133. return;
  134. }
  135. if(confirm("저장하시겠습니까?")){
  136. if(save_must_ck()){
  137. jQuery("#fevent").val("UPDATE_QUOT_DETAIL");
  138. jQuery("#STATUS_CD").val("01");
  139. var f = document.form1;
  140. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "UPDATE_QUOT_DETAIL", f);
  141. }
  142. }
  143. });
  144. $("#btn_Request").click(function() {
  145. var sRow = sheet1.FindStatusRow("D");
  146. if(sRow != ""){
  147. alert("견적 요청시 업체 선택을 해지해 주십시오.");
  148. return;
  149. }
  150. if(confirm("견적 요청하시겠습니까?")){
  151. if(save_must_ck()){
  152. jQuery("#fevent").val("SEND_QUOT_DETAIL");
  153. jQuery("#STATUS_CD").val("02");
  154. var f = document.form1;
  155. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "SEND_QUOT_DETAIL", f);
  156. }
  157. }
  158. });
  159. $("#btn_del").click(function() {
  160. if (confirm("삭제 하시겠습니까?")){
  161. var f = document.form1;
  162. $("#fevent").val("FORM_DELETE");
  163. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "FORM_DELETE", f);
  164. }
  165. });
  166. $("#btn_back").click(function() {
  167. if(confirm("견적 회수 하시겠습니까?")){
  168. jQuery("#fevent").val("STATUS_QUOT_DETAIL");
  169. jQuery("#STATUS_CD").val("01");
  170. var f = document.form1;
  171. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "STATUS_QUOT_DETAIL", f);
  172. }
  173. });
  174. $("#btn_finish").click(function() {
  175. if(confirm("견적 마감하시겠습니까?")){
  176. if(save_must_ck()){
  177. jQuery("#fevent").val("STATUS_QUOT_DETAIL");
  178. jQuery("#STATUS_CD").val("10");
  179. var f = document.form1;
  180. submitXmlRequest("/quot/outside/QuotPlan_form.screen", "STATUS_QUOT_DETAIL", f);
  181. }
  182. }
  183. });
  184. //견적의뢰일자 변경
  185. $("#REQUEST_DATE").change(function() {
  186. if($("#QUOT_BID_FROM_DT").val().length> 0){
  187. if($("#REQUEST_DATE").val()> $("#QUOT_BID_FROM_DT").val()){
  188. alert("견적의뢰일자는 견적제출일이전이어야 합니다.\n- 견적제출일:"+$("#QUOT_BID_FROM_DT").val());
  189. $("#REQUEST_DATE").val("");
  190. return;
  191. }
  192. }
  193. if($("#QUOT_SITEDESCDATE").val().length> 0){
  194. if($("#REQUEST_DATE").val()> $("#QUOT_SITEDESCDATE").val()){
  195. alert("견적의뢰일자는 견적설명일이전이어야 합니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
  196. $("#REQUEST_DATE").val("");
  197. return;
  198. }
  199. }
  200. });
  201. //견적제출기간 변경
  202. $("#QUOT_BID_FROM_DT").change(function() {
  203. if($("#QUOT_SITEDESCDATE").val().length> 0){
  204. if($("#QUOT_BID_FROM_DT").val() < $("#QUOT_SITEDESCDATE").val()){
  205. alert("견적제출일자는 견적설명일 이전일수 없습니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
  206. $("#QUOT_BID_FROM_DT").val("");
  207. return;
  208. }
  209. }
  210. if($("#REQUEST_DATE").val().length> 0){
  211. if($("#QUOT_BID_FROM_DT").val() < $("#REQUEST_DATE").val()){
  212. alert("견적제출기간은 견적의뢰일 이전 일 수 없습니다.\n- 견적의뢰일:"+$("#REQUEST_DATE").val());
  213. $("#QUOT_BID_FROM_DT").val("");
  214. return;
  215. }
  216. }
  217. if($("#QUOT_BID_TO_DT").val().length> 0){
  218. if($("#QUOT_BID_TO_DT").val() < $("#QUOT_BID_FROM_DT").val()){
  219. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  220. $("#QUOT_BID_FROM_DT").val("");
  221. return;
  222. }
  223. }
  224. });
  225. //견적제출기간 변경
  226. $("#QUOT_BID_TO_DT").change(function() {
  227. if($("#QUOT_SITEDESCDATE").val().length> 0){
  228. if($("#QUOT_BID_TO_DT").val() < $("#QUOT_SITEDESCDATE").val()){
  229. alert("견적제출일자는 견적설명일 이전일수 없습니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
  230. $("#QUOT_BID_TO_DT").val("");
  231. return;
  232. }
  233. }
  234. if($("#QUOT_BID_FROM_DT").val().length> 0){
  235. if($("#QUOT_BID_TO_DT").val() < $("#QUOT_BID_FROM_DT").val()){
  236. alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  237. $("#QUOT_BID_TO_DT").val("");
  238. return;
  239. }
  240. }
  241. if($("#REQUEST_DATE").val().length> 0){
  242. if($("#QUOT_BID_TO_DT").val() < $("#REQUEST_DATE").val()){
  243. alert("견적제출기간은 견적의뢰일 이전 일 수 없습니다.\n- 견적의뢰일:"+$("#REQUEST_DATE").val());
  244. $("#QUOT_BID_TO_DT").val("");
  245. return;
  246. }
  247. }
  248. });
  249. $("#QUOT_MAN_EMAIL").change(function() {
  250. if(!checkEmail($("#QUOT_MAN_EMAIL").val())){
  251. alert("이메일 형식이 올바르지 않습니다.");
  252. $("#QUOT_MAN_EMAIL").focus();
  253. }
  254. });
  255. $("#corp_add").click(function(){
  256. var f = document.form1;
  257. if(jQuery("#quot_id").val() == "") {
  258. alert("견적 생성 후 등록 할 수 있습니다.");
  259. return;
  260. }
  261. var win_id = "corp";
  262. var outitem = "<%=Order.get("OUT_ITEM_CD")%>";
  263. var link = "/common/corp/SuppChoicePop.screen";
  264. link += "?pop_win_id="+win_id+"&MENU=QUOT&OUT_ITEM_CD="+outitem;
  265. fLayerPop(win_id, link, 800,400, '','', 'NO');
  266. });
  267. $.test = function(resultVal)
  268. {
  269. for(var i=0; i < resultVal[0].length; i++)
  270. {
  271. var rowcnt = sheet1.RowCount();
  272. if(rowcnt> 0){
  273. for(var r=0; r < rowcnt; r++)
  274. {
  275. var vendor_cd = sheet1.GetCellValue(r+1,"VENDOR_CD");
  276. if(vendor_cd == resultVal[0][i]){
  277. alert(resultVal[4][i]+"는 이미 등록된 업체입니다.");
  278. return;
  279. }
  280. }
  281. }
  282. //sheetObj.DataAutoTrim = false;
  283. var row = sheet1.DataInsert(-1);
  284. sheet1.SetCellValue(row,"VENDOR_CD",resultVal[0][i]);
  285. sheet1.SetCellValue(row,"VENDOR_NO",resultVal[1][i]);
  286. sheet1.SetCellValue(row,"VENDOR_NAME",resultVal[2][i]);
  287. sheet1.SetCellValue(row,"REPRE_NO",resultVal[3][i]);
  288. sheet1.SetCellValue(row,"CHARGE_NAME",resultVal[4][i]);
  289. sheet1.SetCellValue(row,"TEL_NUM",resultVal[5][i]);
  290. sheet1.SetCellValue(row,"CHAGE_HP",resultVal[6][i]);
  291. sheet1.SetCellValue(row,"CHARGE_EMAIL",resultVal[7][i]);
  292. sheet1.SetCellValue(row,"ON_SUPP_YN","Y");
  293. sheet1.SetCellValue(row,"IN_OUT_DIV",resultVal[8][i]);
  294. sheet1.SetCellValue(row,"SITE_ATTEND_YN","");
  295. sheet1.SetCellValue(row,"SITEPARTI_YN","");
  296. }
  297. setGridSize();
  298. setTimeout(function(){fLayerPopClose('corp');},100);
  299. };
  300. $("#btn_row_del").click(function() {
  301. if(confirm("삭제 하시겠습니까?")){
  302. $("#fevent").val("SET_CORP_DELETE");
  303. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotPlan_sheet.screen";
  304. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  305. }
  306. });
  307. $("#btn_resend").click(function() {
  308. var sRow = sheet1.FindStatusRow("D");
  309. if(sRow == ""){
  310. alert("업체를 선택하십시오");
  311. return;
  312. }
  313. if(confirm("견적 요청 SMS,E-MAIL을 재발송하시겠습까?")){
  314. jQuery("#fevent").val("RESEND_QUOT_DETAIL");
  315. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotPlan_sheet.screen";
  316. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  317. }
  318. });
  319. $("#btn_row_save").click(function() {
  320. var sRow = sheet1.FindStatusRow("D");
  321. if(sRow != ""){
  322. alert("업체를 선택하지 마십시오.");
  323. return;
  324. }
  325. if(confirm("저장 하시겠습까?")){
  326. jQuery("#fevent").val("SAVE_DETAIL");
  327. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotPlan_sheet.screen";
  328. var result = Modular.view.IBSheet7.doSave(sheet1, url, $("#form1"), false);
  329. }
  330. });
  331. doSearchSheet();
  332. }
  333. function SearchUser(NAME,CODE,DEPT_YN){
  334. var GB = "";
  335. if(CODE == "REQUEST_MAN_ID"){
  336. CODE = "";
  337. NAME = "";
  338. GB = "REQUEST";
  339. }else if(CODE == "QUOT_MAN_ID"){
  340. CODE = "";
  341. NAME = "";
  342. GB = "QUOT";
  343. }
  344. var win_id = "_searchUserPopup";
  345. var link = "/lib/dlgSearchUserPop.screen";
  346. link += "?pop_win_id="+win_id;
  347. link += "&NAME="+NAME;
  348. link += "&CODE="+CODE;
  349. link += "&GB="+GB;
  350. if(DEPT_YN == "Y")
  351. link += "&deptNameYn=quotation";
  352. fLayerPop(win_id, link, 700,400, '', '', 'NO');
  353. }
  354. function SearchUserClose(result){
  355. if(result[10] == "REQUEST"){
  356. $("#REQUEST_MAN_ID").val(result[9])//ACCT_ID
  357. $("#REQUEST_MAN_NM").val(result[1])//이름
  358. $("#REQUEST_DEPT_CD").val(result[2])//부서코드
  359. $("#REQUEST_DEPT_NM").val(result[3])//부서명
  360. }else if(result[10] == "QUOT"){
  361. $("#QUOT_MAN_ID").val(result[9])//ACCT_ID
  362. $("#QUOT_MAN_NM").val(result[1])//이름
  363. $("#QUOT_MAN_TELNO").val(result[6])//연락처
  364. $("#QUOT_MAN_EMAIL").val(result[8])//이메일
  365. }
  366. setTimeout(function(){fLayerPopClose('_searchUserPopup');},100);
  367. }
  368. function sheet1_OnChange(Row, Col, Value) {
  369. if(Col == 8){//전화번호 형식 체크
  370. if(Value != ""){
  371. if(!checkTelno(Value)){
  372. alert("전화번호 형식이 올바르지 않습니다.");
  373. sheet1.SetCellValue(Row,Col,"");
  374. }
  375. }
  376. }
  377. if(Col == 9){//이메일 형식 체크
  378. if(Value != ""){
  379. if(!checkEmail(Value)){
  380. alert("이메일 형식이 올바르지 않습니다.");
  381. sheet1.SetCellValue(Row,Col,"");
  382. }
  383. }
  384. }
  385. }
  386. function searchAccDept(p_dept_cd, p_dept_nm){
  387. var win_id = "_searchDept";
  388. var link = "/lib/dlgSearchAccDept.screen";
  389. link += "?pop_win_id="+win_id;
  390. //link += "&{{query}}";
  391. fLayerPop(win_id, link, 600,400, '', '', 'NO');
  392. }
  393. function searchAccDeptClose(result){
  394. if( result == null ){
  395. p_dept_cd.value = ""; //부서코드
  396. p_dept_nm.value = ""; //부서명
  397. }else{
  398. p_dept_cd.value = result[0]; //부서코드
  399. p_dept_nm.value = result[1]; //부서명
  400. }
  401. setTimeout(function(){fLayerPopClose('_searchDept');},100);
  402. }
  403. function searchAccDept(p_dept_cd, p_dept_nm){
  404. var win_id = "_searchDept";
  405. var link = "/lib/dlgSearchAccDept.screen";
  406. link += "?pop_win_id="+win_id;
  407. //link += "&{{query}}";
  408. fLayerPop(win_id, link, 600,400, '', '', 'NO');
  409. }
  410. function searchAccDeptClose(result){
  411. if( result == null ){
  412. }else{
  413. sheet1.SetCellValue($("#TEMP_ROW").val(),"RECM_DEPT_ID",result[0]); //부서코드
  414. sheet1.SetCellValue($("#TEMP_ROW").val(),"RECM_DEPT_NM", result[1]); //부서명
  415. }
  416. setTimeout(function(){ fLayerPopClose('_searchDept');},100);
  417. }
  418. function doSearchSheet(){
  419. $("#fevent").val("GET_CORP_LIST");
  420. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotPlan_sheet.screen";
  421. Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
  422. }
  423. /**
  424. * IBSheet object initialize
  425. */
  426. function gridInit(sheetName){
  427. var init_sheet = {};
  428. if(sheetName.id == "sheet1"){
  429. init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
  430. init_sheet.Cols = [
  431. {Header:'선택', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center"},
  432. {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
  433. {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
  434. {Header:'사업자번호', Type:"Text", SaveName:"VENDOR_NO", Width:100, Align:"Center", Format:"SaupNo", Edit:false},
  435. {Header:'업체명', Type:"Text", SaveName:"VENDOR_NAME", Width:100, Align:"Left", Edit:false},
  436. {Header:'대표자명', Type:"Text", SaveName:"REPRE_NO", Width:100, Align:"Center", Edit:false},
  437. {Header:'담당자명', Type:"Text", SaveName:"CHARGE_NAME", Width:100, Align:"Center"},
  438. {Header:'전화번호', Type:"Text", SaveName:"TEL_NUM", Width:100, Align:"Center", Edit:false},
  439. {Header:'핸드폰', Type:"Text", SaveName:"CHAGE_HP", Width:100, Align:"Center"},
  440. {Header:'이메일', Type:"Text", SaveName:"CHARGE_EMAIL", Width:100, Align:"Left"},
  441. {Header:'참석의사', Type:"Combo", SaveName:"SITE_ATTEND_YN", Width:80, Align:"Center", ComboText:"<%=BID_SUPP_SITEPARTI_NM%>", ComboCode:"<%=BID_SUPP_SITEPARTI_CD%>", Edit:false, Cursor:"Pointer"},
  442. {Header:'참석여부', Type:"Combo", SaveName:"SITEPARTI_YN", Width:80, Align:"Center", ComboText:"<%=BID_SUPP_SITEPARTI_NM2%>", ComboCode:"<%=BID_SUPP_SITEPARTI_CD2%>"},
  443. {Header:'최종견적제출시간', Type:"Text", SaveName:"SUBMIT_DT", Width:100, Align:"Center", Edit:false},
  444. {Header:'견적금액(원)', Type:"Text", SaveName:"ESTI_TOT_AMT", Width:100, Align:"Right", Edit:false, Cursor:'pointer'},
  445. {Header:'파일다운', Type:"Text", SaveName:"FILE_DOWN", Width:50, Align:"Center", Edit:false, Cursor:'pointer'},
  446. {Header:'구분', Type:"Text", SaveName:"IN_OUT_DIV_NM", Width:50, Align:"Center", Edit:false, Cursor:'pointer'},
  447. {Header:'IN_OUT_DIV', Type:"Text", SaveName:"IN_OUT_DIV", Width:0, Align:"Center", Hidden:"True"},
  448. {Header:'ON_SUPP_YN', Type:"Text", SaveName:"ON_SUPP_YN", Width:0, Align:"Center", Hidden:"True"},
  449. {Header:'QUOT_BID_NO', Type:"Text", SaveName:"QUOT_BID_NO", Width:0, Align:"Center", Hidden:"True"},
  450. {Header:'QUOT_BID_DEG', Type:"Text", SaveName:"QUOT_BID_DEG", Width:0, Align:"Center", Hidden:"True"},
  451. {Header:'FILE_GB', Type:"Text", SaveName:"FILE_GB", Width:0, Align:"Center", Hidden:"True"},
  452. {Header:'VENDOR_CD', Type:"Text", SaveName:"VENDOR_CD", Width:0, Align:"Center", Hidden:"True"}
  453. ];
  454. }
  455. init_sheet.HeaderMode = {Sort:1};
  456. IBS_InitSheet(sheetName, init_sheet);
  457. sheetName.SetDataAutoTrim(0);
  458. sheetName.SetImageList(1,"/img/buyer/button/bt_search_right.gif");
  459. //sheetName.SizeMode(0);
  460. setGridSize();
  461. }
  462. /**
  463. * IBSheet Event: Click
  464. */
  465. function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  466. }
  467. /**
  468. * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
  469. */
  470. function sheet1_OnSearchEnd(code, message) {
  471. if(code == 0) {
  472. setGridSize();
  473. var rowcnt = sheet1.RowCount();
  474. if(rowcnt> 0){
  475. for(var r=0; r < rowcnt; r++)
  476. {
  477. if(sheet1.GetCellValue(r+1,"SUBMIT_DT") == "미제출"){
  478. sheet1.SetCellFont("FontColor", r+1, 10, r+1, 10, "red");
  479. }
  480. sheet1.SetCellFont("FontColor", r+1, 11, r+1, 11, "blue");
  481. }
  482. }
  483. } else {
  484. //조회 에러 수행
  485. alert(message);
  486. }
  487. }
  488. function save_detail_sheet() {
  489. jQuery("#fevent").val("SAVE_SUPP_DETAIL");
  490. var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/outside/QuotPlan_sheet.screen";
  491. var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
  492. }
  493. /**
  494. * IBSheet size setting
  495. */
  496. function setGridSize() {
  497. sheet1.FitColWidth();
  498. }
  499. function create_must_ck(){
  500. if(must_ck_val("QUOT_BID_MASTER_NM","견적명"))return false;
  501. if(must_ck_val("REQUEST_DATE","견적의뢰일자"))return false;
  502. if(must_ck_val("REQUEST_MAN_ID","견적의뢰자"))return false;
  503. if(must_ck_val("DEALER_NM","사업주"))return false;
  504. if(must_ck_val("WORK_PLACE","현장위치"))return false;
  505. if(must_ck_val("START_WORK_DATE","공사시작일"))return false;
  506. if(must_ck_val("END_WORK_DATE","공사마감일"))return false;
  507. if(must_ck_val("ITEM_NM","공종"))return false;
  508. if(must_ck_val("QUOT_BID_FROM_DT","견적제출일"))return false;
  509. if(time_ck("QUOT_BID_FROM_HH","HH"))return false;
  510. if(time_ck("QUOT_BID_FROM_MI","MI"))return false;
  511. if(must_ck_val("QUOT_BID_TO_DT","견적마감일"))return false;
  512. if(time_ck("QUOT_BID_TO_HH","HH"))return false;
  513. if(time_ck("QUOT_BID_TO_MI","MI"))return false;
  514. if(jQuery("#QUOT_BID_FROM_DT").val() == jQuery("#QUOT_BID_TO_DT").val()){
  515. var fromitme = jQuery("#QUOT_BID_FROM_HH").val()+jQuery("#QUOT_BID_FROM_MI").val();
  516. var toitme = jQuery("#QUOT_BID_TO_HH").val()+jQuery("#QUOT_BID_TO_MI").val();
  517. if(toitme <= fromitme){
  518. alert("견적제출기간 시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  519. jQuery("#QUOT_BID_FROM_HH").focus();
  520. return false;
  521. }
  522. }
  523. if(must_ck_val("QUOT_MAN_ID","견적담당자"))return false;
  524. if(must_ck_val("QUOT_MAN_TELNO ","담당자 전화번호"))return false;
  525. if(must_ck_val("QUOT_MAN_EMAIL","담당자 E-Mail"))return false;
  526. if(must_ck_radio("QUOT_SITEDESC_FLAG","견적설명여부"))return false;
  527. if($(':radio[name="QUOT_SITEDESC_FLAG"]:checked').val() == "Y"){
  528. if(must_ck_val("QUOT_SITEDESCDATE",""))return false;
  529. if(time_ck("QUOT_SITEDESCDATE_HH","HH"))return false;
  530. if(time_ck("QUOT_SITEDESCDATE_MI","MI"))return false;
  531. if(must_ck_val("QUOT_SITEDESCPLACE",""))return false;
  532. }
  533. return true;
  534. }
  535. function save_must_ck(){
  536. if(must_ck_val("QUOT_BID_MASTER_NM","견적명"))return false;
  537. if(must_ck_val("REQUEST_DATE","견적의뢰일자"))return false;
  538. if(must_ck_val("REQUEST_MAN_ID","견적의뢰자"))return false;
  539. if(must_ck_val("DEALER_NM","사업주"))return false;
  540. if(must_ck_val("WORK_PLACE","현장위치"))return false;
  541. if(must_ck_val("START_WORK_DATE","공사시작일"))return false;
  542. if(must_ck_val("END_WORK_DATE","공사마감일"))return false;
  543. if(must_ck_val("ITEM_NM","공종"))return false;
  544. if(must_ck_val("QUOT_BID_FROM_DT","견적제출일"))return false;
  545. if(time_ck("QUOT_BID_FROM_HH","HH"))return false;
  546. if(time_ck("QUOT_BID_FROM_MI","MI"))return false;
  547. if(must_ck_val("QUOT_BID_TO_DT","견적마감일"))return false;
  548. if(time_ck("QUOT_BID_TO_HH","HH"))return false;
  549. if(time_ck("QUOT_BID_TO_MI","MI"))return false;
  550. if(jQuery("#QUOT_BID_FROM_DT").val() == jQuery("#QUOT_BID_TO_DT").val()){
  551. var fromitme = jQuery("#QUOT_BID_FROM_HH").val()+jQuery("#QUOT_BID_FROM_MI").val();
  552. var toitme = jQuery("#QUOT_BID_TO_HH").val()+jQuery("#QUOT_BID_TO_MI").val();
  553. if(toitme <= fromitme){
  554. alert("견적제출기간 시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
  555. jQuery("#QUOT_BID_FROM_HH").focus();
  556. return false;
  557. }
  558. }
  559. if(must_ck_val("QUOT_MAN_ID","견적담당자"))return false;
  560. if(must_ck_val("QUOT_MAN_TELNO ","담당자 전화번호"))return false;
  561. if(must_ck_val("QUOT_MAN_EMAIL","담당자 E-Mail"))return false;
  562. if(must_ck_radio("QUOT_SITEDESC_FLAG","견적설명여부"))return false;
  563. if($(':radio[name="QUOT_SITEDESC_FLAG"]:checked').val() == "Y"){
  564. if(must_ck_val("QUOT_SITEDESCDATE",""))return false;
  565. if(time_ck("QUOT_SITEDESCDATE_HH","HH"))return false;
  566. if(time_ck("QUOT_SITEDESCDATE_MI","MI"))return false;
  567. if(must_ck_val("QUOT_SITEDESCPLACE",""))return false;
  568. }
  569. if(must_ck_val("OUTER_REMARKS","특이사항"))return false;
  570. var rowcnt = sheet1.RowCount();
  571. if(rowcnt == 0){
  572. alert("견적 대상 업체가 1개 이상 이어야 합니다.");
  573. $("#sheet1_div").focus();
  574. return false;
  575. }
  576. var out_check = "N";
  577. for(var r=0; r < rowcnt; r++)
  578. {
  579. var in_out_div = sheet1.GetCellValue(r+1,"IN_OUT_DIV");
  580. if(in_out_div == "O"){
  581. out_check = "Y";
  582. continue;
  583. }
  584. }
  585. if(out_check == "Y" && $("#INNER_REMARKS").val().length == 0){
  586. if(!confirm("해외업체가 등록되어 있으나 특이사항(해외업체)가 등록되어 있지 않습니다.\n진행하시겠습니까?")){
  587. return false;
  588. }
  589. }
  590. return true;
  591. }
  592. // value 값 체크
  593. function must_ck_val(obj,desc){
  594. if($("#"+obj).val().length == 0){
  595. if(desc.length> 0){
  596. alert(desc+must_msg);
  597. }else{
  598. alert($("#"+obj).attr("desc")+must_msg);
  599. }
  600. $("#"+obj).focus();
  601. return true;
  602. }
  603. return false;
  604. }
  605. // radio 박스 체크
  606. function must_ck_radio(obj,name){
  607. var value = $(':radio[name='+obj+']:checked').val();
  608. if(value == undefined){
  609. alert(name+must_msg);
  610. $("#"+obj).focus();
  611. return true;
  612. }
  613. return false;
  614. }
  615. function time_ck(obj,type){
  616. if(must_ck_val(obj,""))return true;
  617. if(!isNumber($("#"+obj).val())){
  618. alert("숫자만 입력 가능합니다.");
  619. $("#"+obj).focus();
  620. return true;
  621. }else{
  622. var time = Number($("#"+obj).val());
  623. if(type == "HH"){
  624. if(time < -1 || time> 23){
  625. alert("0~23 까지 입력 가능합니다.");
  626. $("#"+obj).focus();
  627. return true;
  628. }
  629. }else if(type == "MI"){
  630. if(time < -1 || time> 59){
  631. alert("0~59 까지 입력 가능합니다.");
  632. $("#"+obj).focus();
  633. return true;
  634. }
  635. }
  636. }
  637. if($("#"+obj).val().length == 1){
  638. var timelength = $("#"+obj).val();
  639. $("#"+obj).val("0"+timelength);
  640. }
  641. return false;
  642. }
  643. //첨부파일
  644. function doAttachFile(obj,No) {
  645. var file_div = "quot/outside/"+"<%=Order.get("QUOT_BID_NO")%>"+"/";
  646. var fileName = "견적_";
  647. var upLoadFlg = "Y";
  648. if(<%=Order.get("STATUS_CD")%> == "02" || <%=Order.get("STATUS_CD")%> == "10"){
  649. upLoadFlg = "N";
  650. }
  651. if(obj.value==''){
  652. alert("견적 생성 후, 파일을 첨부할 수가 있습니다.");
  653. }else if(obj != ''){
  654. if(No == 1){
  655. fileName += "내부자료";
  656. viewFileListNew("QUOT_FILE_IN_"+obj.value, obj.value, document.form1.p_AttachFile1, upLoadFlg, file_div, null, null, null, null, "N", fileName);
  657. }else{
  658. fileName += "첨부자료";
  659. viewFileListNew("QUOT_FILE_OUT_"+obj.value, obj.value, document.form1.p_AttachFile2, upLoadFlg, file_div, null, null, null, null, "N", fileName);
  660. }
  661. }
  662. }
  663. function doResult(resultObj) {
  664. try {
  665. if( resultObj.getRequestEvent() == "SAVE_QUOT_DETAIL") {
  666. if( resultObj.getSuccess() ) {
  667. alert("생성 되었습니다.");
  668. $("#btn_list").click();
  669. }
  670. else {
  671. dlgErrorMsg(resultObj);
  672. }
  673. }
  674. if( resultObj.getRequestEvent() == "UPDATE_QUOT_DETAIL") {
  675. if( resultObj.getSuccess() ) {
  676. alert("저장 되었습니다.");
  677. save_detail_sheet();
  678. }
  679. else {
  680. dlgErrorMsg(resultObj);
  681. }
  682. }
  683. if( resultObj.getRequestEvent() == "SEND_QUOT_DETAIL") {
  684. if( resultObj.getSuccess() ) {
  685. alert("전송 되었습니다.");
  686. save_detail_sheet();
  687. }
  688. else {
  689. alert("첨부자료를 등록하시기 바랍니다.");
  690. //dlgErrorMsg(resultObj);
  691. reSearch();
  692. }
  693. }
  694. if( resultObj.getRequestEvent() == "FORM_DELETE") {
  695. if( resultObj.getSuccess() ) {
  696. alert("삭제 되었습니다.");
  697. $("#btn_list").click();
  698. }
  699. else {
  700. dlgErrorMsg(resultObj);
  701. }
  702. }
  703. if( resultObj.getRequestEvent() == "STATUS_QUOT_DETAIL") {
  704. if( resultObj.getSuccess() ) {
  705. alert("견적서 수정이 가능합니다.");
  706. reSearch();
  707. }
  708. else {
  709. dlgErrorMsg(resultObj);
  710. }
  711. }
  712. if( resultObj.getRequestEvent() == "FINISH_QUOT_DETAIL") {
  713. if( resultObj.getSuccess() ) {
  714. alert("견적 마감 되었습니다.");
  715. reSearch();
  716. }
  717. else {
  718. dlgErrorMsg(resultObj);
  719. }
  720. }
  721. } catch(errorObject) {
  722. showErrorDlg("doResult()", errorObject);
  723. }
  724. }
  725. function sheet1_OnSaveEnd(code, msg)
  726. {
  727. var event = $("#fevent").val();
  728. if(event == "SAVE_SUPP_DETAIL"){
  729. if(code>= "0"){
  730. reSearch();
  731. }else{
  732. alert(msg);
  733. }
  734. }else if(event == "SET_CORP_DELETE"){
  735. if(code>= "0"){
  736. alert("삭제 되었습니다.");
  737. reSearch();
  738. }else{
  739. alert(msg);
  740. }
  741. }else if( event == "RESEND_QUOT_DETAIL") {
  742. if(code>= "0"){
  743. alert("재전송 되었습니다.");
  744. reSearch();
  745. }else{
  746. alert(msg);
  747. }
  748. }else if( event == "SAVE_DETAIL") {
  749. if(code>= "0"){
  750. alert("수정 되었습니다.");
  751. reSearch();
  752. }else{
  753. alert(msg);
  754. }
  755. }
  756. else{
  757. if(code>= "0"){
  758. }else{
  759. alert("에러가 발생하였습니다.\n\n"+msg);
  760. }
  761. }
  762. }
  763. function reSearch() {
  764. jQuery("#fevent").val("GET_QUOT_DETAIL");
  765. jQuery("#form1").attr("action", "/quot/outside/QuotPlan.screen");
  766. jQuery("#form1").attr("target", "_self");
  767. jQuery("#form1").attr("method", "post");
  768. jQuery("#form1").submit();
  769. }
  770. function sheet1_OnSmartResize(Width, Height) {
  771. sheet1.FitColWidth();
  772. autoResize();
  773. }
  774. function autoResize(){
  775. sheet1.SetSheetHeight(300);
  776. }
  777. function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
  778. if(Row == 0)return;
  779. if(sheet1.ColSaveName(Col) == "SITE_ATTEND_YN"){
  780. if(sheet1.GetCellValue(Row,"SITE_ATTEND_YN") == "N") {
  781. $("#fevent").val("GET_QUOT_SUPP_DETAIL");
  782. var win_id = "_QuotAmtPop";
  783. var quot_id = jQuery("#quot_id").val();
  784. var link = "/quot/outside/QuotAmtPop.screen";
  785. link += "?pop_win_id="+win_id;
  786. link += "&ROW="+Row;
  787. link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
  788. link += "&QUOT_ID="+quot_id;
  789. link += "&QUOT_BID_NO="+sheet1.GetCellValue(Row,"QUOT_BID_NO");
  790. link += "&QUOT_BID_DEG="+sheet1.GetCellValue(Row,"QUOT_BID_DEG");
  791. link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
  792. link += "&VENDOR_NAME="+sheet1.GetCellValue(Row,"VENDOR_NAME");
  793. link += "&ESTI_TOT_AMT="+sheet1.GetCellValue(Row,"ESTI_TOT_AMT");
  794. link += "&SITE_ATTEND_YN="+sheet1.GetCellValue(Row,"SITE_ATTEND_YN");
  795. link += "&sModule=LM";
  796. //fLayerPop(win_id, link, 1000,400, '', '', 'NO');
  797. window.open(link,win_id,"toolbar=no, width=1000, height=400, top=50, left=40, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
  798. }
  799. }
  800. else if(sheet1.ColSaveName(Col) == "ESTI_TOT_AMT"){
  801. if(jQuery("#quot_id").val() == "") {
  802. alert("견적 생성 후 선택 할 수 있습니다.");
  803. return;
  804. }else if(sheet1.GetCellValue(Row,"ON_SUPP_YN") == "N" || sheet1.GetCellValue(Row,"IN_OUT_DIV") == "O"){ //견적용업체 및 해외업체인 경우
  805. //견적용 업체
  806. $("#fevent").val("GET_QUOT_SUPP_DETAIL");
  807. var win_id = "_QuotAmtPop";
  808. var quot_id = jQuery("#quot_id").val();
  809. var link = "/quot/outside/QuotAmtPop.screen";
  810. link += "?pop_win_id="+win_id;
  811. link += "&ROW="+Row;
  812. link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
  813. link += "&QUOT_ID="+quot_id;
  814. link += "&QUOT_BID_NO="+sheet1.GetCellValue(Row,"QUOT_BID_NO");
  815. link += "&QUOT_BID_DEG="+sheet1.GetCellValue(Row,"QUOT_BID_DEG");
  816. link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
  817. link += "&VENDOR_NAME="+sheet1.GetCellValue(Row,"VENDOR_NAME");
  818. link += "&ESTI_TOT_AMT="+sheet1.GetCellValue(Row,"ESTI_TOT_AMT");
  819. link += "&SITE_ATTEND_YN="+sheet1.GetCellValue(Row,"SITE_ATTEND_YN");
  820. link += "&ON_SUPP_YN="+sheet1.GetCellValue(Row,"ON_SUPP_YN");
  821. link += "&IN_OUT_DIV="+sheet1.GetCellValue(Row,"IN_OUT_DIV");
  822. link += "&sModule=LM";
  823. //fLayerPop(win_id, link, 1000,400, '', '', 'NO');
  824. window.open(link,win_id,"toolbar=no, width=1000, height=460, top=50, left=40, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
  825. }else if(sheet1.GetCellValue(Row,"SUBMIT_DT") == "미제출"){
  826. alert("해당업체는 견적 미제출 상태입니다.");
  827. return;
  828. }else if(sheet1.GetCellValue(Row,"SITE_ATTEND_YN") == "N"){
  829. alert("해당업체는 견적 불참 업체입니다.");
  830. return;
  831. }else{
  832. $("#fevent").val("GET_QUOT_SUPP_DETAIL");
  833. var win_id = "_QuotAmtPop";
  834. var quot_id = jQuery("#quot_id").val();
  835. var link = "/quot/outside/QuotAmtPop.screen";
  836. link += "?pop_win_id="+win_id;
  837. link += "&ROW="+Row;
  838. link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
  839. link += "&QUOT_ID="+quot_id;
  840. link += "&QUOT_BID_NO="+sheet1.GetCellValue(Row,"QUOT_BID_NO");
  841. link += "&QUOT_BID_DEG="+sheet1.GetCellValue(Row,"QUOT_BID_DEG");
  842. link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
  843. link += "&VENDOR_NAME="+sheet1.GetCellValue(Row,"VENDOR_NAME");
  844. link += "&ESTI_TOT_AMT="+sheet1.GetCellValue(Row,"ESTI_TOT_AMT");
  845. link += "&SITE_ATTEND_YN="+sheet1.GetCellValue(Row,"SITE_ATTEND_YN");
  846. link += "&sModule=LM";
  847. //fLayerPop(win_id, link, 1000,400, '', '', 'NO');
  848. window.open(link,win_id,"toolbar=no, width=1000, height=400, top=50, left=40, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new");
  849. }
  850. }else if(sheet1.ColSaveName(Col) == "FILE_DOWN"){
  851. if(jQuery("#quot_id").val() == "") {
  852. alert("견적 생성 후 선택 할 수 있습니다.");
  853. return;
  854. }else if(sheet1.GetCellValue(Row,"SUBMIT_DT") == "미제출"){
  855. alert("해당업체는 견적 미제출 상태입니다.");
  856. return;
  857. }else{
  858. var file_name = sheet1.GetCellValue(Row,"QUOT_BID_NO")+"("+sheet1.GetCellValue(Row,"VENDOR_NAME")+")";
  859. fileDown(file_name, sheet1.GetCellValue(Row,"FILE_GB"));
  860. }
  861. }
  862. }
  863. function fileDown(file_id, file_gb){
  864. var fileName = file_id;
  865. var url="/common/file/FileDownloadServlet";
  866. url += "?mode=zipDown";
  867. url += "&fileName=" + encodeURIComponent(fileName);
  868. url += "&fileGB=" + file_gb;
  869. url += "&ID=<%=Order.get("quot_id")%>";
  870. window.open(url, "_fileDown", "toolbar=no, width=400, height=100, top=500, left=400, toolbar=no,directories=no,status=no,scrollbars=yes,resize=no,menubar=no,target=new")
  871. }
  872. function textareaResize(obj) {
  873. obj.style.height = "80px";
  874. obj.style.height = obj.scrollHeight+"px";
  875. }
  876. </SCRIPT>
  877. <modular:search id="form1">
  878. <modular:key id="fevent" />
  879. </modular:search>
  880. <form id="form1" name="form1" method="post" modular:type="search">
  881. <INPUT type='hidden' name="fevent" id="fevent" value="">
  882. <!-- List Search -->
  883. <INPUT type="hidden" name="p_dept_nm" id="p_dept_nm" value="<%= Order.get("dept_nm") %>">
  884. <INPUT type="hidden" name="p_dept_cd" id="p_dept_cd" value="<%= Order.get("dept_cd") %>">
  885. <!-- List Search -->
  886. <INPUT type='hidden' name="QUOT_BID_NO" value="<%=Order.get("QUOT_BID_NO")%>">
  887. <INPUT type='hidden' name="QUOT_BID_DEG" value="<%=Order.get("QUOT_BID_DEG")%>">
  888. <INPUT type='hidden' name="QUOT_TYPE" value="<%=Order.get("QUOT_TYPE")%>">
  889. <INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
  890. <INPUT type="hidden" name="quot_id" value="<%= params.get("quot_id") %>">
  891. <INPUT type='hidden' name="REQUEST_DEPT_CD" value="<%=Order.get("REQUEST_DEPT_CD")%>">
  892. <INPUT type='hidden' name="QUOT_KIND" value="O">
  893. <INPUT type='hidden' name="SAVE" value="">
  894. <INPUT type='hidden' name="DOC_ETC_IN" value="<%=Order.get("DOC_ETC_IN")%>">
  895. <INPUT type='hidden' name="DOC_ETC_OUT" value="<%=Order.get("DOC_ETC_OUT")%>">
  896. <INPUT type='hidden' name="WARR_CONDI" value="견적의뢰일로 부터">
  897. <!-- 제목 및 버튼 -->
  898. <table width="100%">
  899. <colgroup>
  900. <col width="500" />
  901. <col width="*" />
  902. </colgroup>
  903. <tr>
  904. <th>
  905. <div align="left" id="title">
  906. <ul><li>외주_견적 계획 상세<font style="font-size:11px">(<%=Order.get("STATUS_NM")%>)</font></li></ul>
  907. </div>
  908. </th>
  909. <td align="right">
  910. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_Save">저장</a></span>
  911. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_Request">견적요청</a></span>
  912. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_Create">생성</a></span>
  913. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_del">삭제</a></span>
  914. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_back">견적회수</a></span>
  915. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_finish">견적마감</a></span>
  916. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
  917. </td>
  918. </tr>
  919. </table>
  920. <!-- 견적정보 : 시작 -->
  921. <div class="application-info magT10">
  922. <div class="application-sub-title">
  923. <span class="title">견적의뢰정보</span>
  924. </div>
  925. </div>
  926. <TABLE class="form-table">
  927. <colgroup>
  928. <col width="150"/>
  929. <col width="21%">
  930. <col width="150"/>
  931. <col width="20%">
  932. <col width="160"/>
  933. <col/>
  934. </colgroup>
  935. <TR height="25">
  936. <TH>현장</TH>
  937. <TD><%=Order.get("dept_nm") %></TD>
  938. <TH>견적번호</TH>
  939. <TD><%=Order.get("quot_bid_no") %></TD>
  940. <TH class="required">견적명</TH>
  941. <TD><%= InputText.get("QUOT_BID_MASTER_NM", Order.get("QUOT_BID_MASTER_NM"), 45, 300, "desc=견적명") %> </TD>
  942. </TR>
  943. <TR height="25">
  944. <TH class="required">견적의뢰일자</TH>
  945. <TD><%= InputText.get("REQUEST_DATE", Order.get("REQUEST_DATE"), 10, 10, "desc=견적의뢰일자,center,readOnly") %>
  946. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('REQUEST_DATE');"></TD>
  947. <TH>견적의뢰부서</TH>
  948. <TD><%= InputText.get("REQUEST_DEPT_NM", Order.get("REQUEST_DEPT_NM"), 45, 70, "desc=견적의뢰부서,readOnly") %> </TD>
  949. <TH class="required">견적의뢰자</TH>
  950. <TD><%= InputText.get("REQUEST_MAN_NM", Order.get("REQUEST_MAN_NM"), 21, 50, "desc=견적설명담당자,readOnly") %><INPUT type='hidden' name="REQUEST_MAN_ID" value="<%=Order.get("REQUEST_MAN_ID")%>">
  951. <IMG id="btn_request_man_id" src="/img/buyer/button/bt_search_right.gif" alt="담당자" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:SearchUser('REQUEST_MAN_NM','REQUEST_MAN_ID','N');">
  952. </TD>
  953. </TR>
  954. <TR height="25">
  955. <TH class="required">사업주</TH>
  956. <TD><%= InputText.get("DEALER_NM", Order.get("DEALER_NM"), 45, 50, "desc=사업주") %> </TD>
  957. <TH>CM/감리사</TH>
  958. <TD><%= InputText.get("SUPERVISOR", Order.get("SUPERVISOR"), 45, 50, "desc=CM/감리사") %> </TD>
  959. <TH class="required">현장위치</TH>
  960. <TD><%= InputText.get("WORK_PLACE", Order.get("WORK_PLACE"), 45, 250, "desc=현장위치") %> </TD>
  961. </TR>
  962. <TR height="25">
  963. <TH class="required">공사기간</TH>
  964. <TD><%= InputText.get("START_WORK_DATE", Order.get("START_WORK_DATE"), 10, 10, "desc=공사기간,readOnly,center") %>
  965. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('START_WORK_DATE');">
  966. <%-- <%if(!Order.get("START_WORK_DATE").isEmpty()||!Order.get("END_WORK_DATE").isEmpty()){ %>~<%} %> --%>
  967. ~
  968. <%= InputText.get("END_WORK_DATE", Order.get("END_WORK_DATE"), 10, 10, "desc=공사기간,readOnly,center") %>
  969. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('END_WORK_DATE');">
  970. </TD>
  971. <TH>공사규모</TH>
  972. <TD><%= InputText.get("WORK_SIZE", Order.get("WORK_SIZE"), 45, 250, "desc=공사규모") %> </TD>
  973. <TH class="required">공종</TH>
  974. <TD><%= InputText.get("ITEM_NM", Order.get("ITEM_NM"), 45, 150, "desc=공종") %> </TD>
  975. </TR>
  976. </TABLE>
  977. <!-- 견적정보 : 시작 -->
  978. <div class="application-info magT10">
  979. <div class="application-sub-title">
  980. <span class="title">견적기본정보</span>
  981. </div>
  982. </div>
  983. <TABLE class="form-table">
  984. <colgroup>
  985. <col width="150"/>
  986. <col width="21%">
  987. <col width="150"/>
  988. <col width="20%">
  989. <col width="160"/>
  990. <col/>
  991. </colgroup>
  992. <TR height="25">
  993. <TH class="required">견적제출기간</TH>
  994. <TD><%= InputText.get("QUOT_BID_FROM_DT", Order.get("QUOT_BID_FROM_DT"), 10, 10, "desc=견적제출기간,readOnly,center") %>
  995. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('QUOT_BID_FROM_DT');">
  996. <%= InputText.get("QUOT_BID_FROM_HH", Order.get("QUOT_BID_FROM_HH"), 2, 2, "desc=견적제출기간,Time,center") %> :
  997. <%= InputText.get("QUOT_BID_FROM_MI", Order.get("QUOT_BID_FROM_MI"), 2, 2, "desc=견적제출기간,Time,center") %>
  998. ~
  999. <%= InputText.get("QUOT_BID_TO_DT", Order.get("QUOT_BID_TO_DT"), 10, 10, "desc=견적제출기간,readOnly,center") %>
  1000. <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('QUOT_BID_TO_DT');">
  1001. <%= InputText.get("QUOT_BID_TO_HH", Order.get("QUOT_BID_TO_HH"), 2, 2, "desc=견적제출기간,Time,center") %> :
  1002. <%= InputText.get("QUOT_BID_TO_MI", Order.get("QUOT_BID_TO_MI"), 2, 2, "desc=견적제출기간,Time,center") %>
  1003. </TD>
  1004. <TH>견적유효기간</TH>
  1005. <TD><%= InputText.get("QUOT_VALIDATE", Order.get("QUOT_VALIDATE"), 45, 50, "desc=공사규모") %> </TD>
  1006. <TH class="required">견적담당자</TH>
  1007. <TD>
  1008. <%= InputText.get("QUOT_MAN_NM", Order.get("QUOT_MAN_NM"), 21, 30, "desc=견적담당자,readOnly") %><INPUT type='hidden' name="QUOT_MAN_ID" value="<%=Order.get("QUOT_MAN_ID")%>">
  1009. <IMG id="btn_quot_man_id" src="/img/buyer/button/bt_search_right.gif" alt="담당자" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:SearchUser('QUOT_MAN_NM','QUOT_MAN_ID','Y');">
  1010. </TD>
  1011. </TR>
  1012. <TR height="25">
  1013. <TH class="required">담당자 전화번호</TH>
  1014. <TD><%= InputText.get("QUOT_MAN_TELNO", Order.get("QUOT_MAN_TELNO"), 15, 20, "desc=견적담당자 전화번호") %></TD>
  1015. <TH class="required">담당자 E-Mail</TH>
  1016. <TD><%= InputText.get("QUOT_MAN_EMAIL", Order.get("QUOT_MAN_EMAIL"), 45, 50, "desc=견적담당자 E-Mail") %></TD>
  1017. <TH>담당자 FAX</TH>
  1018. <TD><%= InputText.get("QUOT_MAN_FAX", Order.get("QUOT_MAN_FAX"), 15, 20, "desc=견적담당자 FAX") %>
  1019. </TR>
  1020. <TR height="25">
  1021. <TH class="required">견적설명회 여부</TH>
  1022. <TD>
  1023. <LABEL for="sitedesc_flag_1"><INPUT id="sitedesc_flag_1" type="radio" name="QUOT_SITEDESC_FLAG" value="Y" desc="견적설명여부" <%=Order.get("QUOT_SITEDESC_FLAG").equals("Y") ? "checked=\"checked\"" : "" %>> 예</LABEL>
  1024. <LABEL for="sitedesc_flag_2"><INPUT id="sitedesc_flag_2" type="radio" name="QUOT_SITEDESC_FLAG" value="N" desc="견적설명여부" <%=Order.get("QUOT_SITEDESC_FLAG").equals("N") ? "checked=\"checked\"" : "" %>> 아니오</LABEL>
  1025. </TD>
  1026. <TH>견적설명회 일시</TH>
  1027. <TD>
  1028. <%= InputText.get("QUOT_SITEDESCDATE", Order.get("QUOT_SITEDESCDATE"), 10, 10, "desc=견적설명회,readOnly,center") %>
  1029. <IMG name="calendar_sitedescdate" id="calendar_sitedescdate" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('QUOT_SITEDESCDATE');">
  1030. <%= InputText.get("QUOT_SITEDESCDATE_HH", Order.get("QUOT_SITEDESCDATE_HH"), 2, 2, "desc=견적설명회,Time,center") %> :
  1031. <%= InputText.get("QUOT_SITEDESCDATE_MI", Order.get("QUOT_SITEDESCDATE_MI"), 2, 2, "desc=견적설명회,Time,center") %>
  1032. </TD>
  1033. <TH>견적설명회 장소</TH>
  1034. <TD><%= InputText.get("QUOT_SITEDESCPLACE", Order.get("QUOT_SITEDESCPLACE"), 15, 20, "desc=견적설명회 장소") %> </TD>
  1035. </TR>
  1036. </TABLE>
  1037. <div class="application-info magT20">
  1038. <div class="application-sub-title">
  1039. <span class="title">견적조건</span>
  1040. </div>
  1041. </div>
  1042. <TABLE class="form-table" style="margin-top:5px">
  1043. <colgroup>
  1044. <col width="150"/>
  1045. <col width="50%"/>
  1046. <col width="150"/>
  1047. <col width="*"/>
  1048. <!-- <col width="29%"/>
  1049. <col width="145"/>
  1050. <col/> -->
  1051. </colgroup>
  1052. <TR height="100">
  1053. <TH class="required">특이사항</TH>
  1054. <TD>
  1055. <textarea name="OUTER_REMARKS" id="OUTER_REMARKS" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" onkeyup="textareaResize(this)"><%=Order.get("OUTER_REMARKS")%></textarea>
  1056. </TD>
  1057. <TH>특이사항<br>(해외업체)</TH>
  1058. <TD>
  1059. <textarea name="INNER_REMARKS" id="INNER_REMARKS" style="width:98%; height:80px; overflow-y:auto" maxlength="1000" class="input byteChk ctrlTarget" onkeyup="textareaResize(this)"><%=Order.get("INNER_REMARKS")%></textarea>
  1060. </TD>
  1061. </TR>
  1062. <TR height="100">
  1063. <%-- <TH>내부자료</TH>
  1064. <TD colspan="2">
  1065. <TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get("DOC_ETC_IN") %></TEXTAREA>
  1066. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.quot_id,1);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  1067. </TD> --%>
  1068. <TH class="required">첨부자료</TH>
  1069. <TD colspan="3">
  1070. <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get("DOC_ETC_OUT") %></TEXTAREA>
  1071. <IMG id='search_spot_button' onClick="doAttachFile(document.form1.quot_id,2);" src='/img/buyer/button/bt_change.gif' border='0' align="top" align='absmiddle' alt='[Attach File]' style='cursor:pointer;'>
  1072. </TD>
  1073. </TR>
  1074. <TR height="10">
  1075. <!-- <TH colspan="3">
  1076. </TH> -->
  1077. <TH>대용량파일 link</TH>
  1078. <TD colspan="3"><%= InputText.get("URL_COL", Order.get("URL_COL"), 150, 150, "desc=대용량파일 링크주소") %></TD>
  1079. </TR>
  1080. </TABLE>
  1081. <table id=copr_list width="100%">
  1082. <colgroup>
  1083. <col width="500" />
  1084. <col width="*" />
  1085. </colgroup>
  1086. <tr>
  1087. <th>
  1088. <div class="application-info magT20">
  1089. <div class="application-sub-title">
  1090. <span class="title">견적대상업체</span>
  1091. </div>
  1092. </div>
  1093. </th>
  1094. <td align="right">
  1095. <span class="btnSearch center"><a href="javascript:void(0);" id="corp_add">추가</a></span>
  1096. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_row_del">삭제</a></span>
  1097. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_row_save">저장</a></span>
  1098. <span class="btnSearch center"><a href="javascript:void(0);" id="btn_resend">재전송</a></span>
  1099. </td>
  1100. </tr>
  1101. </table>
  1102. <div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 200px; overflow: auto;">
  1103. <script>createIBSheet('sheet1','100%', '200px');</script>
  1104. </div>
  1105. </form>