| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715 |
- <style>
- .add--pic--sm--wrap.mtx > div:nth-of-type(3):after {
- content: '전고객 등록증';
- font-weight: 400;
- font-size: 12px;
- line-height: 100%;
- text-align: center;
- letter-spacing: -0.03em;
- color: #333333;
- white-space: nowrap;
- }
- </style>
- <?php
- $bid_vat_price = preg_replace("/[^0-9]*/s", "", $bid_vat_price);
- if(!empty($bid_vat_price)) {
- $bid_vat_price = number_format($bid_vat_price);
- }
- //lock 기능 적용
- //AAP 지정 부관리자 입찰 건 수
- $tender_lock_sql = "SELECT *
- FROM tender_master
- WHERE ds_delind ='N'
- AND cd_sale = '$cd_sale'
- AND cd_dealer = '{$_SESSION['s_cd_dealer']}' ";
- // echo $tender_sql;
- $tender_lock_col = mysql_fetch_array(mysql_query($tender_lock_sql));
- $tender_ds_lock_status = "Z0";
- if(!empty($tender_lock_col['ds_lock_status'])) {
- $tender_ds_lock_status = $tender_lock_col['ds_lock_status'];
- }
- ?>
- <section class="mt-5 pt30">
- <div class="trading--drop--down">
- <!-- <h2>내입찰 금액은 <span><?=number_format($bid_price)?>만원</span>입니다.<br/>수수료 적용금액은 <span><?=$bid_vat_price?>만원</span>입니다.</h2> -->
- <h2>내입찰 금액은 <span><?=number_format($bid_price)?>만원</span>입니다.<br/>수수료는 <span><?=$bid_commission?>만원 </span>VAT별도입니다.</h2>
- <div class="accordion" id="accordionExample">
- <div class="accordion-item">
- <h2 class="accordion-header" id="headingOne">
- <?php if($ds_status_contract_step1_sale == "Y"){ ?>
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="false" aria-controls="collapseOne">
- <?php }else { ?>
- <button class="accordion-button collapsed" type="button">
- <?php } ?>
- 고객 통화 후 일정 잡기
- <?php if($ds_status_contract_step2_sale == "Y"){ ?>
- <span class="ms-3 on">확인</span>
- <?php }else { ?>
- <span class="ms-3">미확인</span>
- <?php } ?>
- </h2>
- <div id="collapseOne" class="accordion-collapse collapse" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
- <div class="accordion-body">
- <div class="form--wraper">
- <form id="frmFormStep2" name="frmFormStep2" method="post" action="aap_proc.php" enctype="multipart/form-data">
- <input type="hidden" id="mode" name="mode" value="ContractStep2">
- <input type="hidden" id="cd_sale" name="cd_sale" value="<?=$cd_sale?>">
- <div class="user--info mt-3">
- <dl class="d-flex">
- <dt>고객명 : </dt>
- <dd><?=$nm_name_sale?></dd>
- </dl>
- <dl class="d-flex">
- <dt>연락처 : </dt>
- <dd><?=$nm_hp_sale?></dd>
- </dl>
- </div>
- <div class="align-items-center justify-content-between">
- <div class="date--wrap">
- <input type="date" id="date01" class="form-control" _id="nm_contract_date" name="nm_contract_date" value="<?=$nm_contract_date_sale?>" />
- </div>
- <div class="btn--wrapper mt-3">
- <?php if($ds_status_contract_step2_sale != "Y"){ ?>
- <?php
- //차량 락이 걸려 있지 않아야 버튼이 노출
- if($tender_ds_lock_status == 'Z0') {
- ?>
- <button type='button' class="btn btn-outline-primary" id="btn_contract_step2">확인</button>
- <?php } ?>
- <?php } ?>
- </div>
- </div>
- </form>
- </div>
- </div>
- </div>
- </div>
- <div class="accordion-item">
- <h2 class="accordion-header" id="headingTwo">
- <?php if($ds_status_contract_step2_sale == "Y"){ ?>
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
- <?php }else { ?>
- <button class="accordion-button collapsed" type="button">
- <?php } ?>
- 검차 결과 및 계약 진행
- <?php if($ds_status_contract_step3_sale == "Y"){ ?>
- <span class="ms-3 on">확인</span>
- <?php }else { ?>
- <span class="ms-3">미확인</span>
- <?php } ?>
- </button>
- </h2>
- <div id="collapseTwo" class="accordion-collapse collapse" aria-labelledby="headingTwo" data-bs-parent="#accordionExample">
- <div class="accordion-body">
- <form id="frmFormStep3" name="frmFormStep3" method="post" action="aap_proc.php" enctype="multipart/form-data">
- <input type="hidden" id="mode" name="mode" value="ContractStep3">
- <input type="hidden" id="cd_sale" name="cd_sale" value="<?=$cd_sale?>">
- <div class="mt-3 hide" id="layout_contact_final">
- <textarea class="form-control" rows="5" id="nm_contract_cont_final" name="nm_contract_cont_final" placeholder="ex) 앞 풴다교환 1개-20만원, 앞범퍼 1판-7만원 20만원으로 최종조율, 다음주 수요일 인수예정"><?=$nm_contract_cont_final_sale?></textarea>
- </div>
- <div class="mt-3 hide" id="layout_contact_fail">
- <textarea class="form-control" rows="5" id="nm_contract_fail_reason" name="nm_contract_fail_reason" placeholder="거래실패 or 거래 연기사유를 작성해 주세요"><?=$nm_contract_fail_reason_sale?></textarea>
- </div>
- <div class="align-items-center mt25">
- <div class="form--group">
- <input type="radio" id="ds_status_contract1" name="ds_status_contract" hidden value="Z0"<? if($ds_status_contract_sale == "Z0"){ ?> checked="checked"<? } ?>>
- <label for="ds_status_contract1">거래 완료</label>
- </div>
- <div class="form--group mt-2">
- <input type="radio" id="ds_status_contract2" name="ds_status_contract" hidden value="B0"<? if($ds_status_contract_sale == "B0"){ ?> checked="checked"<? } ?>>
- <label for="ds_status_contract2">거래 연기</label>
- </div>
- <div class="form--group mt-2">
- <input type="radio" id="ds_status_contract3" name="ds_status_contract" hidden value="C0"<? if($ds_status_contract_sale == "C0"){ ?> checked="checked"<? } ?>>
- <label for="ds_status_contract3">거래 실패</label>
- </div>
- <div class="d-flex align-items-center mt-2">
- <input type="text" placeholder="최종금액 입력" style="height:53px;" class="form-control" id="nm_price_final" name="nm_price_final" value="<?=$nm_price_final_sale?>" />
- <label for="" class="ml15">만원</label>
- </div>
- </div>
- <?php
- // UPLOAD_PATH;
- $contract_img_path = $_SERVER['DOCUMENT_ROOT'].UPLOAD_PATH."aap/contract_step/".$cd_sale."_detail/";
- $contract_img_web_path = UPLOAD_PATH."aap/contract_step/".$cd_sale."_detail/";
- $nm_file_chk1_class = "";
- $nm_file_chk1_style = "";
- $nm_file_chk1 = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_chk1_sale)) {
- $nm_file_chk1 = $contract_img_web_path.$nm_file_chk1_sale;
- $nm_file_chk1_class = "upload--file";
- $nm_file_chk1_style = "style='background: url(".$nm_file_chk1.") no-repeat center; background-size:contain;'";
- }
- $nm_file_chk2_class = "";
- $nm_file_chk2_style = "";
- $nm_file_chk2 = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_chk2_sale)) {
- $nm_file_chk2 = $contract_img_web_path.$nm_file_chk2_sale;
- $nm_file_chk2_class = "upload--file";
- $nm_file_chk2_style = "style='background: url(".$nm_file_chk2.") no-repeat center; background-size:contain;'";
- }
- $nm_file_chk3_class = "";
- $nm_file_chk3_style = "";
- $nm_file_chk3 = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_chk3_sale)) {
- $nm_file_chk3 = $contract_img_web_path.$nm_file_chk3_sale;
- $nm_file_chk3_class = "upload--file";
- $nm_file_chk3_style = "style='background: url(".$nm_file_chk3.") no-repeat center; background-size:contain;'";
- }
- $nm_file_chk4_class = "";
- $nm_file_chk4_style = "";
- $nm_file_chk4 = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_chk4_sale)) {
- $nm_file_chk4 = $contract_img_web_path.$nm_file_chk4_sale;
- $nm_file_chk4_class = "upload--file";
- $nm_file_chk4_style = "style='background: url(".$nm_file_chk4.") no-repeat center; background-size:contain;'";
- }
- $nm_file_chk5_class = "";
- $nm_file_chk5_style = "";
- $nm_file_chk5 = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_chk5_sale)) {
- $nm_file_chk5_size = "cover";
- $nm_file_chk5 = $contract_img_web_path.$nm_file_chk5_sale;
- $nm_file_chk5_class = "upload--file";
- $nm_file_chk5_style = "style='background: url(".$nm_file_chk5.") no-repeat center; background-size:contain;'";
- }
- ?>
- <h2 class="title--small mt-5">검차 사진</h2>
- <div class="add--pic--sm--wrap" id="layout_contract_image">
- <div class="<?=$nm_file_chk1_class?>" <?=$nm_file_chk1_style?>>
- <input type="file" hidden id="nm_file_chk1" name="nm_file_chk1" onchange="viewContractThumb(0,this)">
- <label for="nm_file_chk1">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_chk2_class?>" <?=$nm_file_chk2_style?>>
- <input type="file" hidden id="nm_file_chk2" name="nm_file_chk2" onchange="viewContractThumb(1,this)">
- <label for="nm_file_chk2">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_chk3_class?>" <?=$nm_file_chk3_style?>>
- <input type="file" hidden id="nm_file_chk3" name="nm_file_chk3" onchange="viewContractThumb(2,this)">
- <label for="nm_file_chk3">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_chk4_class?>" <?=$nm_file_chk4_style?>>
- <input type="file" hidden id="nm_file_chk4" name="nm_file_chk4" onchange="viewContractThumb(3,this)">
- <label for="nm_file_chk4">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_chk5_class?>" <?=$nm_file_chk5_style?>>
- <input type="file" hidden id="nm_file_chk5" name="nm_file_chk5" onchange="viewContractThumb(4,this)">
- <label for="nm_file_chk5">사진<br />등록</label>
- </div>
- <?php if($ds_status_contract_step3_sale != "Y"){ ?>
- <?php
- //차량 락이 걸려 있지 않아야 버튼이 노출
- if($tender_ds_lock_status == 'Z0') {
- ?>
- <button type='button' class="btn btn-outline-primary" id="btn_contract_step3">확인</button>
- <?php } ?>
- <?php } ?>
- </div>
- </form>
- </div>
- </div>
- </div>
- <div class="accordion-item">
- <h2 class="accordion-header" id="headingThree">
- <?php if($ds_status_contract_step3_sale == "Y"){ ?>
- <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
- <?php }else { ?>
- <button class="accordion-button collapsed" type="button">
- <?php } ?>
- 거래 마무리
- <?php if($ds_status_contract_step4_sale == "Y"){ ?>
- <span class="ms-3 on">확인</span>
- <?php }else { ?>
- <span class="ms-3">미확인</span>
- <?php } ?>
- </button>
- </h2>
- <?php
- $contract_img_path = $_SERVER['DOCUMENT_ROOT'].UPLOAD_PATH."aap/contract_step/".$cd_sale."_detail/";
- $contract_img_web_path = UPLOAD_PATH."aap/contract_step/".$cd_sale."_detail/";
- // echo $contract_img_path.$nm_file_trading_sale;
- // exit;
- $nm_file_trading_class = "";
- $nm_file_trading_style = "";
- $nm_file_trading = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_trading_sale)) {
- $nm_file_trading = $contract_img_web_path.$nm_file_trading_sale;
- $nm_file_trading_class = "upload--file";
- $nm_file_trading_style = "style='background: url(".$nm_file_trading.") no-repeat center; background-size:contain;'";
- }
- $nm_file_performance_class = "";
- $nm_file_performance_style = "";
- $nm_file_performance = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_performance_sale)) {
- $nm_file_performance = $contract_img_web_path.$nm_file_performance_sale;
- $nm_file_performance_class = "upload--file";
- $nm_file_performance_style = "style='background: url(".$nm_file_performance.") no-repeat center; background-size:contain;'";
- }
- $nm_file_regist_class = "";
- $nm_file_regist_style = "";
- $nm_file_regist = $car_no_img;
- if(file_exists($contract_img_path.$nm_file_regist_sale)) {
- $nm_file_regist = $contract_img_web_path.$nm_file_regist_sale;
- $nm_file_regist_class = "upload--file";
- $nm_file_regist_style = "style='background: url(".$nm_file_regist.") no-repeat center; background-size:contain;'";
- }
- ?>
- <div id="collapseThree" class="accordion-collapse collapse" aria-labelledby="headingThree" data-bs-parent="#accordionExample">
- <div class="accordion-body">
- <form id="frmFormStep4" name="frmFormStep4" method="post" action="aap_proc.php" enctype="multipart/form-data">
- <input type="hidden" id="mode" name="mode" value="ContractStep4">
- <input type="hidden" id="cd_sale" name="cd_sale" value="<?=$cd_sale?>">
- <?php if($ds_status_contract_step4_sale != "Y"){ ?>
- <div class="add--pic--sm--wrap mtx" id="layout_contract_end_image">
- <div class="<?=$nm_file_trading_class?>" <?=$nm_file_trading_style?>>
- <input type="file" hidden name="nm_file_trading" id="nm_file_trading" onchange="viewContractEndThumb(0,this)">
- <label for="nm_file_trading">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_performance_class?>" <?=$nm_file_performance_style?>>
- <input type="file" hidden name="nm_file_performance" id="nm_file_performance" onchange="viewContractEndThumb(1,this)">
- <label for="nm_file_performance">사진<br />등록</label>
- </div>
- <div class="<?=$nm_file_regist_class?>" <?=$nm_file_regist_style?>>
- <input type="file" hidden name="nm_file_regist" id="nm_file_regist" onchange="viewContractEndThumb(2,this)">
- <label for="nm_file_regist">사진<br />등록</label>
- </div>
- <?php
- //차량 락이 걸려 있지 않아야 버튼이 노출
- if($tender_ds_lock_status == 'Z0') {
- ?>
- <button type='button' class="btn btn-outline-primary" id="btn_contract_step4">확인</button>
- <?php } ?>
- </div>
- <?php }else { ?>
- <div class="add--pic--sm--wrap mtx" id="layout_contract_end_image">
- <div class="<?=$nm_file_trading_class?>" <?=$nm_file_trading_style?>>
- <a href="<?=$nm_file_trading?>"></a>
- </div>
- <div class="<?=$nm_file_performance_class?>" <?=$nm_file_performance_style?>>
- <a href="<?=$nm_file_performance?>"></a>
- </div>
- <div class="<?=$nm_file_regist_class?>" <?=$nm_file_regist_style?>>
- <a href="<?=$nm_file_regist?>"></a>
- </div>
- </div>
- <?php } ?>
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- </section>
- <style>
- .add--pic--sm--wrap.mtx a{
- display:block;
- width:100%;
- height:100%;
- }
- </style>
- <script language="javascript" type="text/javascript">
- function viewContractThumb(seq, arg){
- if (arg.files && arg.files[0])
- {
- var reader = new FileReader();
- reader.onload = function (e) {
- //no-repeat center; background-size:contain;
- $("#layout_contract_image div:eq("+seq+")").css({"background-image":"url('"+e.target.result+"')","background-size":"contain","background-position":"center"})
- .addClass("upload--file");
- // $(".photo_regist .pc_type_pv:eq("+seq+")").css({"background-image":"url('"+e.target.result+"')","background-size":"cover","background-position":"center"});
- // $(".photo_regist .pc_type_pv:eq("+seq+") span").html("");
- }
- reader.readAsDataURL(arg.files[0]);
- }
- }
- function viewContractEndThumb(seq, arg){
- if (arg.files && arg.files[0])
- {
- var reader = new FileReader();
- reader.onload = function (e) {
- //no-repeat center; background-size:contain;
- $("#layout_contract_end_image div:eq("+seq+")").css({"background-image":"url('"+e.target.result+"')","background-size":"contain","background-position":"center"})
- .addClass("upload--file");
- // $(".photo_regist .pc_type_pv:eq("+seq+")").css({"background-image":"url('"+e.target.result+"')","background-size":"cover","background-position":"center"});
- // $(".photo_regist .pc_type_pv:eq("+seq+") span").html("");
- }
- reader.readAsDataURL(arg.files[0]);
- }
- }
- $(document).ready(function() {
- $("input[name='nm_accident_detail[]']").attr("disabled", "disabled");
- $("#btn_cal").bind("click",function(){
- $("#nm_contract_date").datepicker('show');
- });
- // $("#btn_contract_step1").bind("click",function(){
- // var fieldlist = [["ds_status_contract_step1","확인여부"]]
- // if (!fnCheckForm_ty2(fieldlist)){
- // return false;
- // }
- //
- // fnCheckForm_normal_date_confirm("정보를 등록하시겠습니까?","frmFormStep1");
- // // var c = confirm("정보를 등록하시겠습니까?");
- // // if(c){
- // // $("#frmFormStep1").submit();
- // // }else{
- // // return false;
- // // }
- // });
- $("input[name=ds_status_contract]").on("click", function() {
- var val = $(this).val();
- switch(val) {
- case 'Z0':
- $("#layout_contact_final").removeClass("hide");
- $("#layout_contact_fail").addClass("hide");
- break;
- case 'B0':
- case 'C0':
- $("#layout_contact_final").addClass("hide");
- $("#layout_contact_fail").removeClass("hide");
- break;
- }
- });
- <?php if(!empty($ds_status_contract_sale)) { ?>
- $("input[name=ds_status_contract][value=<?=$ds_status_contract_sale?>]").click();
- <?php } ?>
- $("#btn_contract_step2").bind("click",function(){
- var custom_opts = {
- title : '',
- btn_close_show : false,
- }
- var fieldlist = [["date01","일정 만남일"]]
- if (!fnCheckForm(fieldlist)){
- return false;
- }
- custom_opts.title = '정보를 등록하시겠습니까?';
- custom_modal_confirm(custom_opts, function(confirm) {
- if(confirm) {
- $("#btn_contract_step2").hide();
- var data = $("#frmFormStep2").serialize();
- $.ajax({
- url : 'aap_proc.php',
- type: 'POST',
- dataType : 'json',
- data: data,
- success: function(res) {
- custom_modal_confirm_close();
- $("#btn_contract_step2").show();
- //세션 종료시 로그인 페이지로 이동
- if(res.CODE != "0000") {
- custom_opts.title = res.MSG;
- if(res.CODE == "4444") {
- window.location.href = res.DATAS.URL;
- }
- custom_modal_alert(custom_opts);
- return false;
- }
- custom_opts.title = '등록되었습니다.';
- custom_opts.event_esc_key = false;
- custom_modal_alert(custom_opts, function() {
- reload();
- });
- },
- error:function(request,status,error){
- $("#btn_contract_step2").show();
- custom_modal_confirm_close();
- alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
- }
- });
- }else {
- $("#btn_contract_step2").show();
- return false;
- }
- });
- });
- $("#btn_contract_step3").bind("click",function(){
- var custom_opts = {
- title : '',
- btn_close_show : false,
- }
- ///
- // var fieldlist = [["ds_status_contract","계약 상황"]]
- // if (!fnCheckForm(fieldlist)){
- // return false;
- // }
- if($('input[name="ds_status_contract"]:checked').length < 1) {
- custom_opts.title = '계약 상황을 선택하세요.';
- custom_modal_alert(custom_opts);
- return false;
- }
- if ($('input[name="ds_status_contract"]:checked').val() == "Z0"){
- fieldlist = [["nm_price_final","최종가격"],["nm_file_chk1","검차사진"]]
- if (!fnCheckForm(fieldlist)){
- return false;
- }
- }
- if ($('input[name="ds_status_contract"]:checked').val() == "B0" || $('input[name="ds_status_contract"]:checked').val() == "C0"){
- fieldlist = [["nm_contract_fail_reason","거래연기 or 거래 실패 사유"]]
- if (!fnCheckForm(fieldlist)){
- return false;
- }
- }
- custom_opts.title = '정보를 등록하시겠습니까?';
- custom_modal_confirm(custom_opts, function(confirm) {
- if(confirm) {
- var formData = new FormData();
- $("#frmFormStep3 input, #frmFormStep3 select, #frmFormStep3 textarea").each(function() {
- var input_name = $(this).attr("name");
- var input_value = $(this).val();
- var input_type = $(this).attr("type");
- switch(input_type) {
- case 'radio':
- formData.append(input_name, $("input[name="+input_name+"]:checked").val());
- break;
- default:
- formData.append(input_name, input_value);
- break;
- }
- });
- $("#frmFormStep3 input[type=file]").each(function() {
- var input_name = $(this).attr("name");
- var input_value = $(this)[0].files[0];
- formData.append(input_name, input_value);
- });
- $("#btn_contract_step3").hide();
- // var data = $("#frmFormStep3").serialize();
- $.ajax({
- url : 'aap_proc.php',
- type: 'POST',
- dataType : 'json',
- data: formData,
- processData: false,
- contentType: false,
- success: function(res) {
- custom_modal_confirm_close();
- $("#btn_contract_step3").show();
- //세션 종료시 로그인 페이지로 이동
- if(res.CODE != "0000") {
- custom_opts.title = res.MSG;
- if(res.CODE == "4444") {
- window.location.href = res.DATAS.URL;
- }
- custom_modal_alert(custom_opts);
- return false;
- }
- custom_opts.title = '등록되었습니다.';
- custom_opts.event_esc_key = false;
- custom_modal_alert(custom_opts, function() {
- reload();
- });
- },
- error:function(request,status,error){
- $("#btn_contract_step3").show();
- custom_modal_confirm_close();
- alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
- }
- });
- }else {
- $("#btn_contract_step3").show();
- return false;
- }
- });
- // fnCheckForm_normal_date_confirm("정보를 등록하시겠습니까?","frmFormStep3");
- // var c = confirm("정보를 등록하시겠습니까?");
- // if(c){
- // $("#frmFormStep3").submit();
- // }else{
- // return false;
- // }
- });
- $("#btn_contract_step4").bind("click",function(){
- var custom_opts = {
- title : '',
- btn_close_show : false,
- }
- var fieldlist = [["nm_file_trading","상사이전등록증"],["nm_file_performance","성능지"],["nm_file_regist","전고객 등록증"]]
- if (!fnCheckForm(fieldlist)){
- return false;
- }
- custom_opts.title = '정보를 등록하시겠습니까?';
- custom_modal_confirm(custom_opts, function(confirm) {
- if(confirm) {
- var formData = new FormData();
- $("#frmFormStep4 input, #frmFormStep4 select, #frmFormStep4 textarea").each(function() {
- var input_name = $(this).attr("name");
- var input_value = $(this).val();
- var input_type = $(this).attr("type");
- switch(input_type) {
- case 'radio':
- formData.append(input_name, $("input[name="+input_name+"]:checked").val());
- break;
- default:
- formData.append(input_name, input_value);
- break;
- }
- });
- $("#frmFormStep4 input[type=file]").each(function() {
- var input_name = $(this).attr("name");
- var input_value = $(this)[0].files[0];
- formData.append(input_name, input_value);
- });
- $("#btn_contract_step4").hide();
- // var data = $("#frmFormStep3").serialize();
- $.ajax({
- url : 'aap_proc.php',
- type: 'POST',
- dataType : 'json',
- data: formData,
- processData: false,
- contentType: false,
- success: function(res) {
- custom_modal_confirm_close();
- $("#btn_contract_step4").show();
- //세션 종료시 로그인 페이지로 이동
- if(res.CODE != "0000") {
- custom_opts.title = res.MSG;
- if(res.CODE == "4444") {
- window.location.href = res.DATAS.URL;
- }
- custom_modal_alert(custom_opts);
- return false;
- }
- custom_opts.title = '등록되었습니다.';
- custom_opts.event_esc_key = false;
- custom_modal_alert(custom_opts, function() {
- reload();
- });
- },
- error:function(request,status,error){
- $("#btn_contract_step4").show();
- custom_modal_confirm_close();
- alert("code:"+request.status+"\n"+"message:"+request.responseText+"\n"+"error:"+error);
- }
- });
- }else {
- $("#btn_contract_step4").show();
- return false;
- }
- });
- // fnCheckForm_normal_date_confirm("정보를 등록하시겠습니까?","frmFormStep4");
- // var c = confirm("정보를 등록하시겠습니까?");
- // if(c){
- // $("#frmFormStep4").submit();
- // }else{
- // return false;
- // }
- });
- $("#deal_step > li > div.step_tit").click(function(){
- ;
- // alert($(this).closest("li").attr("noauth"));
- if($(this).closest("li").attr("noauth") == undefined){
- if(!$(this).closest("li").hasClass("on")){
- $(this).closest("li").parents(".success_confirm").find("li > p").removeClass("on");
- $(this).closest("li").addClass("on");
- } else {
- $(this).closest("li").removeClass("on");
- }
- }else{
- fnCheckForm_ty4("먼저 이전 단계 확인바랍니다.");
- }
- });
- $("#nm_contract_date").datepicker({ dateFormat: 'yy-mm-dd' });
- <? if(!($ds_status_contract_step1_sale != "Y" && $ds_status_contract_step1_sale != "N")){ ?>
- $($("#deal_step > li > div.step_tit").get().reverse()).each(function(i) {
- if($(this).closest("li").attr("noauth") == undefined){
- $(this).click();
- return false;
- }
- })
- <? } ?>
- // var radioContent = $(".tab_cont");
- // $(".deal_check input[type='radio']").click(function(){
- // radioContent.hide();
- // radioContent.eq($("input[type='radio']").index(this)).show();
- // });
- });
- </script>
|