123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937 |
- <%--
- - Author(s) : Hoonseok choi
- - Date : 2023.01.18
- - Description: 견적_계획 상세
- --%>
-
- <%@ page contentType="text/html; charset=utf-8" %>
- <%@page import="kr.co.hsnc.common.config.WAFConfig"%>
- <%@ page import="com.udapsoft.waf.system.HandlerStorage" %>
- <%@ page import="com.udapsoft.waf.common.ui.*" %>
- <%@ page import="kr.co.udapsoft.common.code.*" %>
- <%@ page import="kr.co.hsnc.common.util.*"%>
- <%@ page import="kr.co.hsnc.common.sql.*" %>
- <%@ page import="com.udapsoft.waf.common.util.Formatter2"%>
- <%@ page import="com.udapsoft.waf.common.util.StringUtils"%>
- <%@ page import="kr.co.udapsoft.common.util.Crosscert"%>
- <%@ include file="/jsp/work/taglib.jsp" %>
- <jsp:useBean id="ctx" class="com.udapsoft.waf.system.context.SessionContext" scope="session" />
- <%
- ctx.init(request, response);
- HandlerStorage storage = ctx.getHandlerStorage();
- ValueObject params = storage.getParams();
- ValueObject user = storage.getUser();
- ValueObject Order = storage.getValueObject("Order");
- ValueObject filein = storage.getValueObject("DOC_ETC_IN");
- ValueObject fileout = storage.getValueObject("DOC_ETC_OUT");
-
- String gwurl = "http://gw.sgcenc.co.kr/";
-
- String isModify = "";
- if(Order.get("quot_id").equals("")) {
- isModify = "false";
- } else {
- isModify = "true";
- }
-
- String today = DateUtil.formatDateTime(DateUtil.getToday(), "yyyyMMdd", "yyyyMMdd");
-
- //공통코드
- CommCodeManager commCodeManager = new CommCodeManager();
- InitCombo initCombo = new InitCombo();
- initCombo.makeComboData(commCodeManager.getCodeRowSet("QUOT_SUPP_SITEPARTI"), "NAME", "CODE");
- String BID_SUPP_SITEPARTI_CD = initCombo.getCode();
- String BID_SUPP_SITEPARTI_NM = initCombo.getCodeName();
-
- InitCombo initCombo2 = new InitCombo();
- initCombo2.makeComboData(commCodeManager.getCodeRowSet("QUOT_SUPP_SITEPARTI","CHG_CODE01","1"), "DETAILNM", "DETAILCD");
- String BID_SUPP_SITEPARTI_CD2 = initCombo2.getCode();
- String BID_SUPP_SITEPARTI_NM2 = initCombo2.getCodeName();
- %>
- <SCRIPT language="JavaScript">
- document.body.onresize = addEvent( document.body.onresize, "autoResize()");
- /*예약함수*/
- var sheet1 = new ibsheetObject();
- var sheet1Row;
- var sheet1PageNo = 1;
- var pageLastRowIndex = 1;
- var validationResult = false;
- var filterShow = false;
- var btn_act = "";
- var must_msg = "(은)는 필수 입력 항목입니다.";
- function _onReady(){
- /**
- * IBSheet object initialize
- */
- gridInit(sheet1);
- /**
- * Application Initialize
- */
- $("#sitedesc_flag_1").click(function() {
- $("#QUOT_SITEDESCDATE").attr("disabled",false);
- $("#QUOT_SITEDESCDATE_HH").attr("disabled",false);
- $("#QUOT_SITEDESCDATE_MI").attr("disabled",false);
- $("#QUOT_SITEDESCPLACE").attr("disabled",false);
- $("#calendar_sitedescdate").show();
- });
-
- $("#sitedesc_flag_2").click(function() {
- $("#QUOT_SITEDESCDATE").attr("disabled",true);
- $("#QUOT_SITEDESCDATE").val("");
- $("#QUOT_SITEDESCDATE_HH").attr("disabled",true);
- $("#QUOT_SITEDESCDATE_HH").val("");
- $("#QUOT_SITEDESCDATE_MI").attr("disabled",true);
- $("#QUOT_SITEDESCDATE_MI").val("");
- $("#QUOT_SITEDESCPLACE").attr("disabled",true);
- $("#QUOT_SITEDESCPLACE").val("");
- $("#calendar_sitedescdate").hide();
- });
-
- //라디오 박스 체크 여부 // N 일경우 비활성화
- if($("#sitedesc_flag_2").attr("checked") == "checked") $("#sitedesc_flag_2").click();
-
- $("#btn_list").click(function() {
- jQuery("#fevent").val("");
- jQuery("#form1").attr("action", "/quot/purchase/QuotPurResultList.screen");
- jQuery("#form1").attr("target", "_self");
- jQuery("#form1").attr("method", "post");
- jQuery("#form1").submit();
- });
- $("#btn_requot").click(function() {
- if(confirm("재견적 하시겠습니까?")){
- if($("#MAX_QUOT_BID_DEG").val()==$("#QUOT_BID_DEG").val()){
- jQuery("#fevent").val("SAVE_REQUOT_DETAIL");
- var f = document.form1;
- submitXmlRequest("/quot/purchase/QuotPurResult_form.screen", "SAVE_REQUOT_DETAIL", f);
- }else{
- if($("#MAX_STATUS_CD").val()=='01' || $("#MAX_STATUS_CD").val()=='02'){
- alert("재견적 진행중입니다.");
- }else{
- alert("최종차수에서 재견적 가능합니다.\n최종차수 : "+$("#MAX_QUOT_BID_DEG").val()+"차수");
- }
-
- }
- }
- });
-
-
- //견적의뢰일자 변경
- $("#REQUEST_DATE").change(function() {
- if($("#QUOT_BID_FROM_DT").val().length> 0){
- if($("#REQUEST_DATE").val()> $("#QUOT_BID_FROM_DT").val()){
- alert("견적의뢰일자는 견적제출일이전이어야 합니다.\n- 견적제출일:"+$("#QUOT_BID_FROM_DT").val());
- $("#REQUEST_DATE").val("");
- return;
- }
- }
-
- if($("#QUOT_SITEDESCDATE").val().length> 0){
- if($("#REQUEST_DATE").val()> $("#QUOT_SITEDESCDATE").val()){
- alert("견적의뢰일자는 견적설명일이전이어야 합니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
- $("#REQUEST_DATE").val("");
- return;
- }
- }
- });
- //견적제출기간 변경
- $("#QUOT_BID_FROM_DT").change(function() {
- if($("#QUOT_SITEDESCDATE").val().length> 0){
- if($("#QUOT_BID_FROM_DT").val() < $("#QUOT_SITEDESCDATE").val()){
- alert("견적제출일자는 견적설명일 이전일수 없습니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
- $("#QUOT_BID_FROM_DT").val("");
- return;
- }
- }
- if($("#REQUEST_DATE").val().length> 0){
- if($("#QUOT_BID_FROM_DT").val() < $("#REQUEST_DATE").val()){
- alert("견적제출기간은 견적의뢰일 이전 일 수 없습니다.\n- 견적의뢰일:"+$("#REQUEST_DATE").val());
- $("#QUOT_BID_FROM_DT").val("");
- return;
- }
- }
- if($("#QUOT_BID_TO_DT").val().length> 0){
- if($("#QUOT_BID_TO_DT").val() < $("#QUOT_BID_FROM_DT").val()){
- alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
- $("#QUOT_BID_FROM_DT").val("");
- return;
- }
- }
- });
-
- //견적제출기간 변경
- $("#QUOT_BID_TO_DT").change(function() {
- if($("#QUOT_SITEDESCDATE").val().length> 0){
- if($("#QUOT_BID_TO_DT").val() < $("#QUOT_SITEDESCDATE").val()){
- alert("견적제출일자는 견적설명일 이전일수 없습니다.\n- 견적설명일:"+$("#QUOT_SITEDESCDATE").val());
- $("#QUOT_BID_TO_DT").val("");
- return;
- }
- }
- if($("#QUOT_BID_FROM_DT").val().length> 0){
- if($("#QUOT_BID_TO_DT").val() < $("#QUOT_BID_FROM_DT").val()){
- alert("시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
- $("#QUOT_BID_TO_DT").val("");
- return;
- }
- }
- if($("#REQUEST_DATE").val().length> 0){
- if($("#QUOT_BID_TO_DT").val() < $("#REQUEST_DATE").val()){
- alert("견적제출기간은 견적의뢰일 이전 일 수 없습니다.\n- 견적의뢰일:"+$("#REQUEST_DATE").val());
- $("#QUOT_BID_TO_DT").val("");
- return;
- }
- }
- });
-
- $("#QUOT_MAN_EMAIL").change(function() {
- if(!checkEmail($("#QUOT_MAN_EMAIL").val())){
- alert("이메일 형식이 올바르지 않습니다.");
- $("#QUOT_MAN_EMAIL").focus();
- }
- });
-
- doSearchSheet();
- }
-
- function sheet1_OnChange(Row, Col, Value) {
- if(Col == 8){//전화번호 형식 체크
- if(Value != ""){
- if(!checkTelno(Value)){
- alert("전화번호 형식이 올바르지 않습니다.");
- sheet1.SetCellValue(Row,Col,"");
- }
- }
- }
- if(Col == 9){//이메일 형식 체크
- if(Value != ""){
- if(!checkEmail(Value)){
- alert("이메일 형식이 올바르지 않습니다.");
- sheet1.SetCellValue(Row,Col,"");
- }
- }
- }
- }
-
- function searchAccDept(p_dept_cd, p_dept_nm){
- var win_id = "_searchDept";
- var link = "/lib/dlgSearchAccDept.screen";
- link += "?pop_win_id="+win_id;
- //link += "&{{query}}";
- fLayerPop(win_id, link, 600,400, '', '', 'NO');
- }
- function searchAccDeptClose(result){
-
- if( result == null ){
- p_dept_cd.value = ""; //부서코드
- p_dept_nm.value = ""; //부서명
- }else{
- p_dept_cd.value = result[0]; //부서코드
- p_dept_nm.value = result[1]; //부서명
- }
- setTimeout(function(){fLayerPopClose('_searchDept');},100);
- }
- function searchAccDept(p_dept_cd, p_dept_nm){
- var win_id = "_searchDept";
- var link = "/lib/dlgSearchAccDept.screen";
- link += "?pop_win_id="+win_id;
- //link += "&{{query}}";
- fLayerPop(win_id, link, 600,400, '', '', 'NO');
- }
-
- function searchAccDeptClose(result){
- if( result == null ){
- }else{
- sheet1.SetCellValue($("#TEMP_ROW").val(),"RECM_DEPT_ID",result[0]); //부서코드
- sheet1.SetCellValue($("#TEMP_ROW").val(),"RECM_DEPT_NM", result[1]); //부서명
- }
-
- setTimeout(function(){ fLayerPopClose('_searchDept');},100);
- }
-
- function doSearchSheet(){
- $("#fevent").val("GET_CORP_LIST");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/purchase/QuotPurResult_sheet.screen";
- Modular.view.IBSheet7.doSearch(sheet1, url, jQuery("#form1"), 30, "");
- }
-
- /**
- * IBSheet object initialize
- */
- function gridInit(sheetName){
- var init_sheet = {};
- if(sheetName.id == "sheet1"){
- init_sheet.Cfg = {SearchMode:2, Page:30, MergeSheet:msHeaderOnly};
- init_sheet.Cols = [
- {Header:'선택', Type:"DelCheck", SaveName:"DEL_CHECK", Width:0, Align:"Center"},
- {Header:'Status', Type:"Status", SaveName:"STATUS", Width:0, Align:"Center", Hidden:"True"},
- {Header:'No.', Type:"Seq", SaveName:"NO", Width:0, Align:"Center", Hidden:"True"},
- {Header:'사업자번호', Type:"Text", SaveName:"VENDOR_NO", Width:100, Align:"Center", Format:"SaupNo", Edit:false},
- {Header:'업체명', Type:"Text", SaveName:"VENDOR_NAME", Width:100, Align:"Left", Edit:false},
- {Header:'대표자명', Type:"Text", SaveName:"REPRE_NO", Width:100, Align:"Center", Edit:false},
- {Header:'담당자명', Type:"Text", SaveName:"CHARGE_NAME", Width:100, Align:"Center"},
- {Header:'전화번호', Type:"Text", SaveName:"TEL_NUM", Width:100, Align:"Center", Edit:false},
- {Header:'핸드폰', Type:"Text", SaveName:"CHAGE_HP", Width:100, Align:"Center"},
- {Header:'이메일', Type:"Text", SaveName:"CHARGE_EMAIL", Width:100, Align:"Left"},
- {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"},
- {Header:'참석여부', Type:"Combo", SaveName:"SITEPARTI_YN", Width:80, Align:"Center", ComboText:"<%=BID_SUPP_SITEPARTI_NM2%>", ComboCode:"<%=BID_SUPP_SITEPARTI_CD2%>"},
- {Header:'최종견적제출시간', Type:"Text", SaveName:"SUBMIT_DT", Width:100, Align:"Center", Edit:false},
- {Header:'견적금액(원)', Type:"Text", SaveName:"ESTI_TOT_AMT", Width:100, Align:"Right", Edit:false, Cursor:'pointer'},
- {Header:'파일다운', Type:"Text", SaveName:"FILE_DOWN", Width:50, Align:"Center", Edit:false, Cursor:'pointer'},
- {Header:'QUOT_BID_NO', Type:"Text", SaveName:"QUOT_BID_NO", Width:0, Align:"Center", Hidden:"True"},
- {Header:'QUOT_BID_DEG', Type:"Text", SaveName:"QUOT_BID_DEG", Width:0, Align:"Center", Hidden:"True"},
- {Header:'FILE_GB', Type:"Text", SaveName:"FILE_GB", Width:0, Align:"Center", Hidden:"True"},
- {Header:'VENDOR_CD', Type:"Text", SaveName:"VENDOR_CD", Width:0, Align:"Center", Hidden:"True"}
- ];
- }
- init_sheet.HeaderMode = {Sort:1};
- IBS_InitSheet(sheetName, init_sheet);
- sheetName.SetDataAutoTrim(0);
- sheetName.SetImageList(1,"/img/buyer/button/bt_search_right.gif");
- //sheetName.SizeMode(0);
- setGridSize();
- }
-
- /**
- * IBSheet Event: Click
- */
- function sheet1_OnClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- }
-
- /**
- * IBSheet Event: Search End(IBSheet 데이터 조회 CallBack)
- */
- function sheet1_OnSearchEnd(code, message) {
- if(code == 0) {
- setGridSize();
- var rowcnt = sheet1.RowCount();
-
- if(rowcnt> 0){
- for(var r=0; r < rowcnt; r++)
- {
- if(sheet1.GetCellValue(r+1,"SUBMIT_DT") == "미제출"){
- sheet1.SetCellFont("FontColor", r+1, 10, r+1, 10, "red");
- }
- sheet1.SetCellFont("FontColor", r+1, 11, r+1, 11, "blue");
- }
- }
- } else {
- //조회 에러 수행
- alert(message);
- }
- }
-
- function save_detail_sheet() {
- jQuery("#fevent").val("SAVE_SUPP_DETAIL");
- var url = Modular.model.PageContext.CONTEXT_ROOT + "/quot/purchase/QuotPurResult_sheet.screen";
- var result = Modular.view.IBSheet7.doSave(sheet1, url, jQuery("#form1"), false);
- }
-
- /**
- * IBSheet size setting
- */
- function setGridSize() {
- sheet1.FitColWidth();
- }
-
- function create_must_ck(){
- if(must_ck_val("QUOT_BID_MASTER_NM","견적명"))return false;
- if(must_ck_val("REQUEST_DATE","견적의뢰일자"))return false;
- if(must_ck_val("REQUEST_MAN_ID","견적의뢰자"))return false;
- if(must_ck_val("DEALER_NM","사업주"))return false;
- if(must_ck_val("WORK_PLACE","현장위치"))return false;
- if(must_ck_val("START_WORK_DATE","공사시작일"))return false;
- if(must_ck_val("END_WORK_DATE","공사마감일"))return false;
- if(must_ck_val("ITEM_NM","공종"))return false;
- return true;
- }
-
- function save_must_ck(){
- if(must_ck_val("QUOT_BID_MASTER_NM","견적명"))return false;
- if(must_ck_val("REQUEST_DATE","견적의뢰일자"))return false;
- if(must_ck_val("REQUEST_MAN_ID","견적의뢰자"))return false;
- if(must_ck_val("DEALER_NM","사업주"))return false;
- if(must_ck_val("WORK_PLACE","현장위치"))return false;
- if(must_ck_val("START_WORK_DATE","공사시작일"))return false;
- if(must_ck_val("END_WORK_DATE","공사마감일"))return false;
- if(must_ck_val("ITEM_NM","공종"))return false;
- if(must_ck_val("QUOT_BID_FROM_DT","견적제출일"))return false;
- if(time_ck("QUOT_BID_FROM_HH","HH"))return false;
- if(time_ck("QUOT_BID_FROM_MI","MI"))return false;
- if(must_ck_val("QUOT_BID_TO_DT","견적마감일"))return false;
- if(time_ck("QUOT_BID_TO_HH","HH"))return false;
- if(time_ck("QUOT_BID_TO_MI","MI"))return false;
- if(jQuery("#QUOT_BID_FROM_DT").val() == jQuery("#QUOT_BID_TO_DT").val()){
- var fromitme = jQuery("#QUOT_BID_FROM_HH").val()+jQuery("#QUOT_BID_FROM_MI").val();
- var toitme = jQuery("#QUOT_BID_TO_HH").val()+jQuery("#QUOT_BID_TO_MI").val();
- if(toitme <= fromitme){
- alert("견적제출기간 시작 또는 종료(마감) 일시가 잘못 입력되었습니다.");
- jQuery("#QUOT_BID_FROM_HH").focus();
- return false;
- }
- }
- if(must_ck_val("QUOT_MAN_ID","견적담당자"))return false;
- if(must_ck_val("QUOT_MAN_TELNO ","담당자 전화번호"))return false;
- if(must_ck_val("QUOT_MAN_EMAIL","담당자 E-Mail"))return false;
- if(must_ck_val("OUTER_REMARKS","특이사항 외부"))return false;
-
- if(must_ck_radio("QUOT_SITEDESC_FLAG","견적설명여부"))return false;
- if($(':radio[name="QUOT_SITEDESC_FLAG"]:checked').val() == "Y"){
- if(must_ck_val("QUOT_SITEDESCDATE",""))return false;
- if(time_ck("QUOT_SITEDESCDATE_HH","HH"))return false;
- if(time_ck("QUOT_SITEDESCDATE_MI","MI"))return false;
- if(must_ck_val("QUOT_SITEDESCPLACE",""))return false;
- }
-
- var rowcnt = sheet1.RowCount();
- if(rowcnt == 0){
- alert("견적 대상 업체가 1개 이상 이어야 합니다.");
- $("#sheet1_div").focus();
- return false;
- }
- return true;
- }
-
- // value 값 체크
- function must_ck_val(obj,desc){
- if($("#"+obj).val().length == 0){
- if(desc.length> 0){
- alert(desc+must_msg);
- }else{
- alert($("#"+obj).attr("desc")+must_msg);
- }
- $("#"+obj).focus();
- return true;
- }
- return false;
- }
-
- // radio 박스 체크
- function must_ck_radio(obj,name){
- var value = $(':radio[name='+obj+']:checked').val();
- if(value == undefined){
- alert(name+must_msg);
- $("#"+obj).focus();
- return true;
- }
- return false;
- }
-
- function time_ck(obj,type){
- if(must_ck_val(obj,""))return true;
- if(!isNumber($("#"+obj).val())){
- alert("숫자만 입력 가능합니다.");
- $("#"+obj).focus();
- return true;
- }else{
- var time = Number($("#"+obj).val());
- if(type == "HH"){
- if(time < -1 || time> 23){
- alert("0~23 까지 입력 가능합니다.");
- $("#"+obj).focus();
- return true;
- }
- }else if(type == "MI"){
- if(time < -1 || time> 59){
- alert("0~59 까지 입력 가능합니다.");
- $("#"+obj).focus();
- return true;
- }
- }
- }
- if($("#"+obj).val().length == 1){
- var timelength = $("#"+obj).val();
- $("#"+obj).val("0"+timelength);
- }
- return false;
- }
-
- //첨부파일
- function doAttachFile(obj,No) {
- var file_div = "quot/purchase/"+"<%=Order.get("QUOT_BID_NO")%>"+"/";
- var fileName = "견적_";
- var upLoadFlg = "Y";
- if(<%=Order.get("STATUS_CD")%> == "02" || <%=Order.get("STATUS_CD")%> == "10"){
- upLoadFlg = "N";
- }
- if(obj.value==''){
- alert("견적 생성 후, 파일을 첨부할 수가 있습니다.");
- }else if(obj != ''){
- if(No == 1){
- fileName += "내부자료";
- viewFileListNew("QUOT_FILE_IN_"+obj.value, obj.value, document.form1.p_AttachFile1, upLoadFlg, file_div, null, null, null, null, "N", fileName);
- }else{
- fileName += "외부자료";
- viewFileListNew("QUOT_FILE_OUT_"+obj.value, obj.value, document.form1.p_AttachFile2, upLoadFlg, file_div, null, null, null, null, "N", fileName);
- }
- }
- }
-
- function doResult(resultObj) {
- try {
- if( resultObj.getRequestEvent() == "SAVE_REQUOT_DETAIL") {
- if( resultObj.getSuccess() ) {
- alert("재견적 생성 되었습니다.");
-
- jQuery("#fevent").val("");
- jQuery("#form1").attr("action", "/quot/purchase/QuotPurPlanList.screen");
- jQuery("#form1").attr("target", "_self");
- jQuery("#form1").attr("method", "post");
- jQuery("#form1").submit();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "UPDATE_QUOT_DETAIL") {
- if( resultObj.getSuccess() ) {
- alert("저장 되었습니다.");
- save_detail_sheet();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "SEND_QUOT_DETAIL") {
- if( resultObj.getSuccess() ) {
- alert("전송 되었습니다.");
- save_detail_sheet();
- }
- else {
- alert("외부자료를 등록하시기 바랍니다.");
- //dlgErrorMsg(resultObj);
- reSearch();
- }
- }
-
- if( resultObj.getRequestEvent() == "FORM_DELETE") {
- if( resultObj.getSuccess() ) {
- alert("삭제 되었습니다.");
- $("#btn_list").click();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "STATUS_QUOT_DETAIL") {
- if( resultObj.getSuccess() ) {
- alert("견적서 수정이 가능합니다.");
- reSearch();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
-
- if( resultObj.getRequestEvent() == "FINISH_QUOT_DETAIL") {
- if( resultObj.getSuccess() ) {
- alert("견적 마감 되었습니다.");
- reSearch();
- }
- else {
- dlgErrorMsg(resultObj);
- }
- }
-
- } catch(errorObject) {
- showErrorDlg("doResult()", errorObject);
- }
- }
-
- function sheet1_OnSaveEnd(code, msg)
- {
- var event = $("#fevent").val();
- if(event == "SAVE_SUPP_DETAIL"){
- if(code>= "0"){
- reSearch();
- }else{
- alert(msg);
- }
- }else if(event == "SET_CORP_DELETE"){
- if(code>= "0"){
- alert("삭제 되었습니다.");
- reSearch();
- }else{
- alert(msg);
- }
- }else if( event == "RESEND_QUOT_DETAIL") {
- if(code>= "0"){
- alert("재전송 되었습니다.");
- reSearch();
- }else{
- alert(msg);
- }
- }else if( event == "SAVE_DETAIL") {
- if(code>= "0"){
- alert("수정 되었습니다.");
- reSearch();
- }else{
- alert(msg);
- }
- }
- else{
- if(code>= "0"){
-
- }else{
- alert("에러가 발생하였습니다.\n\n"+msg);
- }
- }
- }
-
- function reSearch() {
- jQuery("#fevent").val("GET_QUOT_DETAIL");
- jQuery("#form1").attr("action", "/quot/purchase/QuotPurPlan.screen");
- jQuery("#form1").attr("target", "_self");
- jQuery("#form1").attr("method", "post");
- jQuery("#form1").submit();
- }
-
- function sheet1_OnSmartResize(Width, Height) {
- sheet1.FitColWidth();
- autoResize();
- }
- function autoResize(){
- sheet1.SetSheetHeight(300);
- }
-
- function sheet1_OnDblClick(Row, Col, Value, CellX, CellY, CellW, CellH) {
- if(Row == 0)return;
-
- if(sheet1.ColSaveName(Col) == "SITE_ATTEND_YN"){
- if(sheet1.GetCellValue(Row,"SITE_ATTEND_YN") == "N") {
- $("#fevent").val("GET_QUOT_SUPP_DETAIL");
- var win_id = "_QuotAmtPop";
- var quot_id = jQuery("#quot_id").val();
- var link = "/quot/outside/QuotAmtPop.screen";
- link += "?pop_win_id="+win_id;
- link += "&ROW="+Row;
- link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
- link += ""_ID="+quot_id;
- link += ""_BID_NO="+sheet1.GetCellValue(Row,"QUOT_BID_NO");
- link += ""_BID_DEG="+sheet1.GetCellValue(Row,"QUOT_BID_DEG");
- link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
- link += "&VENDOR_NAME="+sheet1.GetCellValue(Row,"VENDOR_NAME");
- link += "&ESTI_TOT_AMT="+sheet1.GetCellValue(Row,"ESTI_TOT_AMT");
- link += "&SITE_ATTEND_YN="+sheet1.GetCellValue(Row,"SITE_ATTEND_YN");
- link += "&sModule=LM";
- //fLayerPop(win_id, link, 1000,400, '', '', 'NO');
- 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");
- }
- }
- else if(sheet1.ColSaveName(Col) == "ESTI_TOT_AMT"){
- if(jQuery("#quot_id").val() == "") {
- alert("견적 생성 후 선택 할 수 있습니다.");
- return;
- }else if(sheet1.GetCellValue(Row,"SUBMIT_DT") == "미제출"){
- alert("해당업체는 견적 미제출 상태입니다.");
- return;
- }else if(sheet1.GetCellValue(Row,"SITE_ATTEND_YN") == "N"){
- alert("해당업체는 견적 불참 업체입니다.");
- return;
- }else{
- $("#fevent").val("GET_QUOT_SUPP_DETAIL");
- var win_id = "_QuotAmtPop";
- var quot_id = jQuery("#quot_id").val();
- var link = "/quot/outside/QuotAmtPop.screen";
- link += "?pop_win_id="+win_id;
- link += "&ROW="+Row;
- link += "&VENDOR_CD="+sheet1.GetCellValue(Row,"VENDOR_CD");
- link += ""_ID="+quot_id;
- link += ""_BID_NO="+sheet1.GetCellValue(Row,"QUOT_BID_NO");
- link += ""_BID_DEG="+sheet1.GetCellValue(Row,"QUOT_BID_DEG");
- link += "&FILE_GB="+sheet1.GetCellValue(Row,"FILE_GB");
- link += "&VENDOR_NAME="+sheet1.GetCellValue(Row,"VENDOR_NAME");
- link += "&ESTI_TOT_AMT="+sheet1.GetCellValue(Row,"ESTI_TOT_AMT");
- link += "&SITE_ATTEND_YN="+sheet1.GetCellValue(Row,"SITE_ATTEND_YN");
- link += "&sModule=LM";
- //fLayerPop(win_id, link, 1000,400, '', '', 'NO');
- 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");
- }
- }else if(sheet1.ColSaveName(Col) == "FILE_DOWN"){
- if(jQuery("#quot_id").val() == "") {
- alert("견적 생성 후 선택 할 수 있습니다.");
- return;
- }else if(sheet1.GetCellValue(Row,"SUBMIT_DT") == "미제출"){
- alert("해당업체는 견적 미제출 상태입니다.");
- return;
- }else{
- var file_name = sheet1.GetCellValue(Row,"QUOT_BID_NO")+"("+sheet1.GetCellValue(Row,"VENDOR_NAME")+")";
- fileDown(file_name, sheet1.GetCellValue(Row,"FILE_GB"));
- }
- }
- }
- function fileDown(file_id, file_gb){
- var fileName = file_id;
- var url="/common/file/FileDownloadServlet";
- url += "?mode=zipDown";
- url += "&fileName=" + encodeURIComponent(fileName);
- url += "&fileGB=" + file_gb;
- url += "&ID=<%=Order.get("quot_id")%>";
- 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")
- }
-
- function textareaResize(obj) {
- obj.style.height = "80px";
- obj.style.height = obj.scrollHeight+"px";
- }
- </SCRIPT>
- <modular:search id="form1">
- <modular:key id="fevent" />
- </modular:search>
- <form id="form1" name="form1" method="post" modular:type="search">
- <INPUT type='hidden' name="fevent" id="fevent" value="">
- <!-- List Search -->
- <INPUT type="hidden" name="p_dept_nm" id="p_dept_nm" value="<%= Order.get("dept_nm") %>">
- <INPUT type="hidden" name="p_dept_cd" id="p_dept_cd" value="<%= Order.get("dept_cd") %>">
- <!-- List Search -->
- <INPUT type='hidden' name="QUOT_BID_NO" value="<%=Order.get("QUOT_BID_NO")%>">
- <INPUT type='hidden' name="QUOT_BID_DEG" value="<%=Order.get("QUOT_BID_DEG")%>">
- <INPUT type='hidden' name="QUOT_TYPE" value="<%=Order.get("QUOT_TYPE")%>">
- <INPUT type='hidden' name="STATUS_CD" value="<%=Order.get("STATUS_CD")%>">
- <INPUT type="hidden" name="quot_id" value="<%= params.get("quot_id") %>">
- <INPUT type='hidden' name="REQUEST_DEPT_CD" value="<%=Order.get("REQUEST_DEPT_CD")%>">
- <INPUT type='hidden' name="MAX_QUOT_BID_DEG" value="<%=Order.get("MAX_QUOT_BID_DEG")%>">
- <INPUT type='hidden' name="MAX_STATUS_CD" value="<%=Order.get("MAX_STATUS_CD")%>">
- <INPUT type='hidden' name="QUOT_KIND" value="P">
- <INPUT type='hidden' name="SAVE" value="">
- <INPUT type='hidden' name="DOC_ETC_IN" value="<%=Order.get("DOC_ETC_IN")%>">
- <INPUT type='hidden' name="DOC_ETC_OUT" value="<%=Order.get("DOC_ETC_OUT")%>">
- <INPUT type='hidden' name="WARR_CONDI" value="견적의뢰일로 부터">
- <!-- 제목 및 버튼 -->
- <table width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div align="left" id="title">
- <ul><li>구매_견적 결과</li></ul>
- </div>
- </th>
- <td align="right">
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_requot">재견적</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_list">목록</a></span>
- </td>
- </tr>
- </table>
- <!-- 견적정보 : 시작 -->
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">견적의뢰정보</span>
- </div>
- </div>
- <TABLE class="form-table">
- <colgroup>
- <col width="150"/>
- <col width="21%">
- <col width="150"/>
- <col width="20%">
- <col width="160"/>
- <col/>
- </colgroup>
- <TR height="25">
- <TH>현장</TH>
- <TD><%=Order.get("dept_nm") %></TD>
- <TH>견적번호</TH>
- <TD><%=Order.get("quot_bid_no") %></TD>
- <TH class="required">견적명</TH>
- <TD><%= InputText.get("QUOT_BID_MASTER_NM", Order.get("QUOT_BID_MASTER_NM"), 45, 300, "desc=견적명") %> </TD>
- </TR>
-
- <TR height="25">
- <TH class="required">견적의뢰일자</TH>
- <TD><%= InputText.get("REQUEST_DATE", Order.get("REQUEST_DATE"), 10, 10, "desc=견적의뢰일자,center,readOnly") %>
- <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('REQUEST_DATE');"></TD>
- <TH>견적의뢰부서</TH>
- <TD><%= InputText.get("REQUEST_DEPT_NM", Order.get("REQUEST_DEPT_NM"), 45, 70, "desc=견적의뢰부서,readOnly") %> </TD>
- <TH class="required">견적의뢰자</TH>
- <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")%>">
- <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');">
- </TD>
- </TR>
-
- <TR height="25">
- <TH class="required">사업주</TH>
- <TD><%= InputText.get("DEALER_NM", Order.get("DEALER_NM"), 45, 50, "desc=사업주") %> </TD>
- <TH>CM/감리사</TH>
- <TD><%= InputText.get("SUPERVISOR", Order.get("SUPERVISOR"), 45, 50, "desc=CM/감리사") %> </TD>
- <TH class="required">현장위치</TH>
- <TD><%= InputText.get("WORK_PLACE", Order.get("WORK_PLACE"), 45, 250, "desc=현장위치") %> </TD>
- </TR>
-
- <TR height="25">
- <TH class="required">공사기간</TH>
- <TD><%= InputText.get("START_WORK_DATE", Order.get("START_WORK_DATE"), 10, 10, "desc=공사기간,readOnly,center") %>
- <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('START_WORK_DATE');">
- <%-- <%if(!Order.get("START_WORK_DATE").isEmpty()||!Order.get("END_WORK_DATE").isEmpty()){ %>~<%} %> --%>
- ~
- <%= InputText.get("END_WORK_DATE", Order.get("END_WORK_DATE"), 10, 10, "desc=공사기간,readOnly,center") %>
- <IMG name="start_img" src="/img/buyer/button/bt_calender.gif" border="0" align="absmiddle" style="cursor:pointer;" onClick="JavaScript:dlgCalendar('END_WORK_DATE');">
- </TD>
- <TH>공사규모</TH>
- <TD><%= InputText.get("WORK_SIZE", Order.get("WORK_SIZE"), 45, 250, "desc=공사규모") %> </TD>
- <TH class="required">공종</TH>
- <TD><%= InputText.get("ITEM_NM", Order.get("ITEM_NM"), 45, 150, "desc=공종") %> </TD>
- </TR>
- </TABLE>
- <!-- 견적정보 : 시작 -->
- <div class="application-info magT10">
- <div class="application-sub-title">
- <span class="title">견적기본정보</span>
- </div>
- </div>
- <TABLE class="form-table">
- <colgroup>
- <col width="150"/>
- <col width="21%">
- <col width="150"/>
- <col width="20%">
- <col width="160"/>
- <col/>
- </colgroup>
- <TR height="25">
- <TH class="required">견적제출기간</TH>
- <TD><%= InputText.get("QUOT_BID_FROM_DT", Order.get("QUOT_BID_FROM_DT"), 10, 10, "desc=견적제출기간,readOnly,center") %>
- <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');">
- <%= InputText.get("QUOT_BID_FROM_HH", Order.get("QUOT_BID_FROM_HH"), 2, 2, "desc=견적제출기간,Time,center") %> :
- <%= InputText.get("QUOT_BID_FROM_MI", Order.get("QUOT_BID_FROM_MI"), 2, 2, "desc=견적제출기간,Time,center") %>
- ~
- <%= InputText.get("QUOT_BID_TO_DT", Order.get("QUOT_BID_TO_DT"), 10, 10, "desc=견적제출기간,readOnly,center") %>
- <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');">
- <%= InputText.get("QUOT_BID_TO_HH", Order.get("QUOT_BID_TO_HH"), 2, 2, "desc=견적제출기간,Time,center") %> :
- <%= InputText.get("QUOT_BID_TO_MI", Order.get("QUOT_BID_TO_MI"), 2, 2, "desc=견적제출기간,Time,center") %>
- </TD>
- <TH>견적유효기간</TH>
- <TD><%= InputText.get("QUOT_VALIDATE", Order.get("QUOT_VALIDATE"), 45, 50, "desc=공사규모") %> </TD>
- <TH class="required">견적담당자</TH>
- <TD>
- <%= 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")%>">
- <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');">
- </TD>
- </TR>
-
- <TR height="25">
- <TH class="required">담당자 전화번호</TH>
- <TD><%= InputText.get("QUOT_MAN_TELNO", Order.get("QUOT_MAN_TELNO"), 15, 20, "desc=견적담당자 전화번호") %></TD>
- <TH class="required">담당자 E-Mail</TH>
- <TD><%= InputText.get("QUOT_MAN_EMAIL", Order.get("QUOT_MAN_EMAIL"), 45, 50, "desc=견적담당자 E-Mail") %></TD>
- <TH>담당자 FAX</TH>
- <TD><%= InputText.get("QUOT_MAN_FAX", Order.get("QUOT_MAN_FAX"), 15, 20, "desc=견적담당자 FAX") %>
- </TR>
-
- <TR height="25">
- <TH class="required">견적설명회 여부</TH>
- <TD>
- <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>
- <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>
- </TD>
- <TH>견적설명회 일시</TH>
- <TD>
-
- <%= InputText.get("QUOT_SITEDESCDATE", Order.get("QUOT_SITEDESCDATE"), 10, 10, "desc=견적설명회,readOnly,center") %>
- <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');">
- <%= InputText.get("QUOT_SITEDESCDATE_HH", Order.get("QUOT_SITEDESCDATE_HH"), 2, 2, "desc=견적설명회,Time,center") %> :
- <%= InputText.get("QUOT_SITEDESCDATE_MI", Order.get("QUOT_SITEDESCDATE_MI"), 2, 2, "desc=견적설명회,Time,center") %>
- </TD>
- <TH>견적설명회 장소</TH>
- <TD><%= InputText.get("QUOT_SITEDESCPLACE", Order.get("QUOT_SITEDESCPLACE"), 15, 20, "desc=견적설명회 장소") %> </TD>
- </TR>
-
- </TABLE>
- <div class="application-info magT20">
- <div class="application-sub-title">
- <span class="title">견적조건</span>
- </div>
- </div>
- <TABLE class="form-table" style="margin-top:5px">
- <colgroup>
- <col width="145"/>
- <col width="%"/>
- <!-- <col width="29%"/>
- <col width="145"/>
- <col/> -->
- </colgroup>
- <TR height="100">
- <%-- <TH>특이사항 내부</TH>
- <TD colspan="2">
- <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>
- </TD> --%>
-
- <TH class="required">특이사항</TH>
- <TD>
- <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>
- </TD>
- </TR>
- <TR height="100">
- <%-- <TH>내부자료</TH>
- <TD colspan="2">
- <TEXTAREA name="p_AttachFile1" id="p_AttachFile1" style="width:85%;height:80px" rows="1" class="input" readOnly><%=filein.get("DOC_ETC_IN") %></TEXTAREA>
- <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;'>
- </TD> --%>
- <TH class="required">첨부자료</TH>
- <TD>
- <TEXTAREA name="p_AttachFile2" id="p_AttachFile2" style="width:85%;height:80px" rows="1" class="input" readOnly><%=fileout.get("DOC_ETC_OUT") %></TEXTAREA>
- <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;'>
- </TD>
- </TR>
- <TR height="10">
- <!-- <TH colspan="3">
- </TH> -->
- <TH>대용량파일 link</TH>
- <TD><%= InputText.get("URL_COL", Order.get("URL_COL"), 150, 150, "desc=대용량파일 링크주소") %></TD>
- </TR>
- </TABLE>
- <table id=copr_list width="100%">
- <colgroup>
- <col width="500" />
- <col width="*" />
- </colgroup>
- <tr>
- <th>
- <div class="application-info magT20">
- <div class="application-sub-title">
- <span class="title">견적대상업체</span>
- </div>
- </div>
- </th>
- <td align="right">
- <!-- <span class="btnSearch center"><a href="javascript:void(0);" id="corp_add">추가</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_row_del">삭제</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_row_save">저장</a></span>
- <span class="btnSearch center"><a href="javascript:void(0);" id="btn_resend">재전송</a></span> -->
- </td>
- </tr>
- </table>
- <div id="sheet1_div" style="padding-top:5px;height: auto; min-height: 200px; overflow: auto;">
- <script>createIBSheet('sheet1','100%', '200px');</script>
- </div>
-
- </form>
|