


<!-- 일정확인 -->
<div class="modal fade type2" id="contractModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog  modal-dialog-centered" style="max-width:280px;">
		<div class="modal-content">
			<div class="modal-header">
				<h1 class="modal-title" id="exampleModalLabel">일정 확인</h1>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div class="modal-body modal--body pt0">
				<div class="date--text"><?=$nm_contract_date_sale?></div>
			</div>
			<div class="modal-footer d-flex justify-content-center ty2 ty--2">
				<button type="button" class="btn btn-primary" style="max-width:100px;" id="btn_contract_step2_confirm">확인</button>
			</div>
		</div>
	</div>
</div>

<!-- 계약 상황 -->
<div class="modal fade type2" id="contractModal3" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog  modal-dialog-centered" style="max-width:335px;">
		<div class="modal-content">
			<div class="modal-header">
				<h1 class="modal-title" id="exampleModalLabel">계약 상황</h1>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>

		<?php
			$nm_contract_desc = "";
			switch($ds_status_contract_sale) {
				case 'Z0':
					$nm_contract_desc = $nm_contract_cont_final_sale;
					break;
				case 'B0':
				case 'C0':
					$nm_contract_desc = $nm_contract_fail_reason_sale;
					break;
			}

			if(!empty($nm_price_sale)) {
				$nm_price_sale = number_format($nm_price_sale);
			}
			if(!empty($nm_price_final_sale)) {
				$nm_price_final_sale = number_format($nm_price_final_sale);
			}
		?>
			<div class="modal-body modal--body pt0">
				<div class="form--wrapper d-flex align-items-center justify-content-start">
					<div class="form--group">
						<input type="radio" id="trd01" name="trd" hidden <? if($ds_status_contract_sale == "Z0"){ ?> checked="checked"<? } ?>>
						<label for="trd01">거래 완료</label>
					</div>
					<div class="form--group ml20">
						<input type="radio" id="trd02" name="trd" hidden <? if($ds_status_contract_sale == "B0"){ ?> checked="checked"<? } ?>>
						<label for="trd02">거래 연기</label>
					</div>
					<div class="form--group ml20">
						<input type="radio" id="trd03" name="trd" hidden <? if($ds_status_contract_sale == "C0"){ ?> checked="checked"<? } ?>>
						<label for="trd03">실패</label>
					</div>
				</div>
				<div class="form--wrapper d-flex align-items-center justify-content-start mt25">
					<label for="" style="white-space:nowrap;"><?=$nm_price_sale?> 만원</label>
					<input type="text" class="form-control ml20" style="max-width:155px; height:40px;" value="<?=$nm_price_final_sale?>">
					<label for="" class="ml20">만원</label>
				</div>
				<div class="form--wrapper mt15">

					<textarea class="form-control" placeholder=""><?=$nm_contract_desc?></textarea>
				</div>
			</div>
			<div class="modal-footer d-flex justify-content-center ty2 ty--2">
				<button type="button" class="btn btn-primary" style="max-width:100px;" id="btn_contract_step3_confirm">확인</button>
			</div>
		</div>
	</div>
</div>

<!-- 거래 마무리 -->
<div class="modal fade type2" id="contractModal4" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog  modal-dialog-centered" style="max-width:280px;">
		<div class="modal-content">
			<div class="modal-header">
				<h1 class="modal-title" id="exampleModalLabel">거래 마무리</h1>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div class="modal-body modal--body pt0">
				<ul class="trading--finish">
					<li>
						상사 이전 등록증 <span class="status--sub">완료</span>
					</li>
					<li>
						성능지 <span class="status--sub">완료</span>
					</li>
					<li>
						전고객 등록증 <span class="status--sub">완료</span>
					</li>
				</ul>
			</div>
			<div class="modal-footer d-flex justify-content-center ty2 ty--2">
				<button type="button" class="btn btn-primary" style="max-width:100px;" id="btn_contract_step4_confirm">확인</button>
			</div>
		</div>
	</div>
</div>
</div>

<!-- 거래 완료 -->
<div class="modal fade type2" id="contractModal5" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog  modal-dialog-centered" style="max-width:280px;">
		<div class="modal-content">
			<div class="modal-header">
				<h1 class="modal-title" id="exampleModalLabel">거래 완료</h1>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div class="modal-body modal--body pt0">
				<div class="date--text"><?=$dt_end_sale?></div>
			</div>
			<div class="modal-footer d-flex justify-content-center ty2 ty--2">
				<button type="button" class="btn btn-primary" data-bs-dismiss="modal" style="max-width:100px;">확인</button>
			</div>
		</div>
	</div>
</div>

<!-- 거래완료 팝업 -->
<!-- <div class="modal fade type2" id="contractModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog  modal-dialog-centered" style="max-width:280px;">
		<div class="modal-content">
			<div class="modal-header">
				<h1 class="modal-title" id="exampleModalLabel">일정 확인</h1>
				<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
			</div>
			<div class="modal-body modal--body pt0">
				<div class="date--text"><?=$nm_contract_date_sale?></div>
			</div>
			<div class="modal-footer d-flex justify-content-center ty2 ty--2">
				<button type="button" class="btn btn-primary" style="max-width:100px;" id="btn_contract_step2_confirm">확인</button>
			</div>
		</div>
	</div>
</div> -->

<script>
$(function() {
	$("#btn_contract_step1_confirm").on("click", function() {
		$("#contractModal1").modal("hide");
	});
	$("#btn_contract_step2_confirm").on("click", function() {
		$("#contractModal2").modal("hide");
	});
	$("#btn_contract_step3_confirm").on("click", function() {
		$("#contractModal3").modal("hide");
	});
	$("#btn_contract_step4_confirm").on("click", function() {
		$("#contractModal4").modal("hide");
	});
	$("#btn_contract_step5_confirm").on("click", function() {
		$("#contractModal5").modal("hide");
	});
})
</script>
