| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <div class="btn--wrapper col-12 d-flex justify-content-center mt90" style="max-width:1200px; margin:0 auto; padding:0 20px;">
- <button type="button" class="btn btn-secondary list--btn" style="width:190px; height:65px;" id="btn_list">목록</button>
- <?php if($ds_status_sale == "B0" || $ds_status_sale == "C0" || $ds_status_sale == "D0") { ?>
- <!-- <button type="button" class="btn btn-primary ms-2" style="width:120px;" id="btn_update_car">차량 정보 수정</button> -->
- <?php } ?>
- <?php
- ?>
- <?php if($ds_status_sale == "Z0" && $ds_status_contract_step1_sale == "Y" && $ds_status_contract_step2_sale == "Y" && $ds_status_contract_step3_sale == "Y" && $ds_status_contract_step4_sale == "Y" && $ds_status_contract_step5_sale != "Y") { ?>
- <button type="button" class="btn btn-primary comp--btn" style="width:190px; height:65px;" id="btn_end_proc">거래 완료 처리</button>
- <?php } ?>
- </div>
- <script>
- function go_list() {
- var url = "<?=$list_url?>";
- var params = {
- ListPageNo : "<?=$PageNo?>",
- PageSort : "<?=$PageSort?>",
- searchtype : "<?=$searchtype?>",
- searchword : "<?=$searchword?>",
- }
- link(url+"?"+$.param(params));
- }
- $(function() {
- $("#btn_list").on("click", function() {
- go_list();
- });
- $("#btn_update_car").on("click", function() {
- var custom_opts = {
- title : '',
- btn_close_show : false,
- }
- custom_opts.title = '차량정보를 수정 하시겠습니까?\n수정 페이지로 이동합니다.';
- custom_modal_confirm(custom_opts, function(confirm) {
- if(confirm) {
- $("#btn_update_car").hide();
- var data = {
- mode : "updateCar"
- , cd_car : '<?=$cd_car?>'
- , cd_sale : '<?=$cd_sale?>'
- , nm_name : '<?=$nm_name?>'
- , nm_hp : '<?=$nm_hp_sale?>'
- , ds_area : '<?=$ds_area_sale?>'
- , nm_number : '<?=$nm_number?>'
- };
- $.post("sell_proc.php", data, function(res) {
- $("#btn_update_car").show();
- custom_modal_confirm_close();
- if(res.CODE != "0000"){
- custom_opts.title = "수정 세션 생성에 실패 했습니다.";
- custom_modal_alert(custom_opts);
- return false;
- }
- link("sell_step1.php");
- }, "json");
- }else {
- $("#btn_update_car").show();
- return false;
- }
- });
- });
- $("#btn_end_proc").on("click", function() {
- var custom_opts = {
- title : '',
- btn_close_show : false,
- }
- custom_opts.title = '거래완료 처리하시겠습니까?';
- custom_modal_confirm(custom_opts, function(confirm) {
- if(confirm) {
- $("#btn_end_proc").hide();
- var data = {
- mode : "TenderEndAAP"
- , cd_car : '<?=$cd_car?>'
- , cd_sale : '<?=$cd_sale?>'
- , nm_name : '<?=$nm_name?>'
- , nm_hp : '<?=$nm_hp_sale?>'
- , ds_area : '<?=$ds_area_sale?>'
- , nm_number : '<?=$nm_number?>'
- };
- $.post("sale_proc.php", data, function(res) {
- $("#btn_end_proc").show();
- custom_modal_confirm_close();
- if(res.CODE != "0000"){
- custom_opts.title = "거래완료 처리에 실패했습니다.";
- custom_modal_alert(custom_opts);
- return false;
- }
- custom_opts.title = "거래완료 처리되었습니다.";
- custom_modal_alert(custom_opts, function() {
- reload();
- });
- return false;
- }, "json");
- }else {
- $("#btn_end_proc").show();
- return false;
- }
- });
- });
- });
- </script>
|