Files
confirms/app/Views/pages/v2/m712/detail.php
yangsh 5079e2e212
Some checks failed
Close Pull Request / main (pull_request_target) Has been cancelled
상세수정
2026-01-13 12:31:12 +09:00

1576 lines
95 KiB
PHP

<?php
$usr_level = session('usr_level');
$usr_id = session('usr_id');
if ($_SERVER['SERVER_ADDR'] == '192.168.10.237') {
$server_addr = 'http://test-admin.confirms.co.kr';
} else {
$server_addr = 'https://admin.confirms.co.kr';
}
$regi_pdf_path = "";
$file_pdf = "";
if (!empty($data['cert_register']) && $data['cert_register_save_yn'] != 'Y') { //등기url있고 등기api이미지 저장여부가 Y가 아닐때
// Array ( [0] => https://cdn.aipartner.com/offerings-doc/org/20260108/53268282/53268282_SMVZneFKli.pdf )
$arr_cert_register = explode('|', $data['cert_register']);
$yn = "true";
$file_pdf = substr($data['cert_register'], -4);
$file_pdf = str_replace(".", "", $file_pdf);
$regi_pdf_path = $arr_cert_register[0];
$parts = explode('.', $arr_cert_register[0]);
$ext = end($parts);
if (strpos($ext, 'pdf') === false) {
$file_pdf = $ext;
} else {
$file_pdf = 'pdf';
}
$regi_pdf_path = $arr_cert_register[0];
} else {
if (empty($regist['file_name'])) {
$yn = "false";
} else {
$yn = "true";
$file_pdf = substr($regist['file_name'], -3);
$regi_pdf_path = $regist['file_path'] . $regist['file_name']; //등기부등본
}
}
$reco_pdf_path = "";
if (!empty($data['confirm_doc_img_url']) && $data['confirm_doc_img_url_save_yn'] != 'Y') { //홍보 url있고 url저장여부가 Y아니면
$reco_pdf_path = $data['confirm_doc_img_url'];
} else {
if (!empty($record)) {
$reco_pdf_path = $record['file_path'] . $record['file_name'];
}
}
function parseurl($url)
{
return preg_replace("#(.+)?\.(\w+)(\?.+)?#", "$2", $url) . "\n";
}
?>
<?= $this->extend('layouts/main') ?>
<?= $this->section('content') ?>
<style>
.tbl_basic2 th {
padding: 0 10px;
height: 27px;
border: solid 1px #d8d9de;
background-color: #eff0f4;
letter-spacing: -1px;
font-weight: normal;
color: #5a5f69;
text-align: left;
}
.num {
font-family: Tahoma;
color: #b68556;
font-size: 17px;
}
</style>
<div class="app-page-title">
<div class="page-title-wrapper">
<div class="page-title-heading">
<div>신홍보확인서 상세 내용</div>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="main-card mb-3 card">
<div class="card-header">
<div class="d-flex align-items-center w-100">
<div class="align-items-start d-flex gap-1">
<?php if (empty($data['cert_register'])): ?>
<?php if (strtolower($file_pdf) != 'pdf'): ?>
<button type="button" class="btn btn-sm btn-outline-secondary"
onclick="faximage_rotate(90)">90˚</button>
<button type="button" class="btn btn-sm btn-outline-secondary"
onclick="faximage_rotate(180)">180˚</button>
<button type="button" class="btn btn-sm btn-outline-secondary"
onclick="faximage_rotate(270)">270˚</button>
<?php endif; ?>
<button class="btn btn-sm btn-outline-success" id="btnUploadModal">
<i class="fa fa-fw" aria-hidden="true"></i> 파일업로드
</button>
<?php endif; ?>
<?php if ($data['document_not_received'] != "Y"): ?>
<button type="button" class="btn btn-sm btn-outline-warning"
onclick="save_document_not_received()">
서류미수취:N
</button>
<?php else: ?>
<button type="button" class="btn btn-sm btn-outline-info"
onclick="save_document_not_received()">
서류미수취:Y
</button>
<?php endif; ?>
</div>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered table-sm align-middle mb-0" style="min-width: 900px;">
<colgroup>
<col style="width: 60%;">
<col style="width: 40%;">
</colgroup>
<tbody>
<tr>
<!-- 좌: 이미지/문서 -->
<td class="p-2 align-top">
<?php
if (!empty($data['cert_register'])) { // 등기url있고
if ($data['cert_register_save_yn'] == 'Y') { //등기api이미지 저장여부가 Y
if (strtolower($file_pdf) == 'pdf') {
echo '<iframe src="' . $server_addr . $regi_pdf_path . '" frameborder="0" style="padding: 10px 0;width:100%; height:800px;"></iframe><br>';
} else {
echo '<div id="regi_file_dis" style="padding: 10px 0px; height: 1200px; overflow-y: auto;">';
if (empty($arrRegist)) {
echo '<img id="photo-display2" src="/plugin/img/photo.gif" alt="Image" style="width:100%;max-width:945px;min-width:100%;border:0;" />';
} else {
foreach ($arrRegist as $row) {
$img_path = $row['file_path'] . $row['file_name'];
echo '<a href="' . $img_path . '" class="default_val" target="_blank" rel="lightbox[gallery1]">' .
'<img id="photo-display2" src="' . $img_path . '" alt="Image" style="width:100%;max-width:945px;min-width:100%;border:0;" />' .
'</a>';
}
}
echo '</div><br>';
}
} else { //등기api이미지 저장여부가 N
if (strtolower($file_pdf) == 'pdf') {
echo '<iframe src="' . $regi_pdf_path . '" frameborder="0" style="padding: 10px 0;width:100%; height:800px;"></iframe><br>';
} else {
echo '<div id="regi_file_dis" style="padding: 10px 0px; height: 1200px; overflow-y: auto;">';
if (empty($arr_cert_register)) {
echo '<img id="photo-display2" src="/plugin/img/photo.gif" alt="Image" style="width:100%;max-width:945px;min-width:100%;border:0;" />';
} else {
foreach ($arr_cert_register as $img_path) {
echo '<a href="' . $img_path . '" class="default_val" target="_blank" rel="lightbox[gallery1]">' .
'<img id="photo-display2" src="' . $img_path . '" alt="Image" style="width:100%;max-width:945px;min-width:100%;border:0;" />' .
'</a>';
}
}
echo '</div><br>';
}
}
} else {
if (empty($regist)) {
$regi_img_path = '/plugin/img/photo.gif';
} else {
if (empty($regist['file_path']) || empty($regist['file_name'])) {
$regi_img_path = '/plugin/img/photo.gif';
} else {
if ($regist['cloud_upload_yn'] == 'Y') {
$regi_img_path = NCLOUD_OBJECT_STORAGE_URL . $regist['file_path'] . $regist['file_name'];
} else {
// 로컬에 저장된 이미지
$regi_img_path = $regist['file_path'] . $regist['file_name'];
}
}
}
?>
<iframe src="<?= $regi_img_path ?>" frameborder="0"
style="padding: 10px 0;width:100%; height:800px;"></iframe><br>
<br>
<a href="<?= $regi_pdf_path ?>" class="default_val" target="_blank">등기부등본
보기</a>&nbsp;&nbsp;&nbsp;
<?php
}
?>
</td>
<td class="p-2 align-top" style="min-width:360px;">
<div class="main-card mb-3 card">
<div class="card-header">
<div class="d-flex align-items-center w-100">
<span class="fw-semibold">기본 정보</span>
<div class="ms-auto">
<span class="badge bg-light text-dark"
id="span_current_stat"></span>
</div>
</div>
</div>
<div class="card-body p-2">
<table class="table table-sm mb-2 tbl_basic2 align-middle">
<colgroup>
<col style="width: 110px;">
<col>
</colgroup>
<tbody>
<tr>
<th>매물번호</th>
<td>
<div class="input-group input-group-sm"
style="max-width: 320px;">
<input type="text" class="form-control" name="atcl_no"
id="atcl_no" value="<?= $data['atcl_no'] ?>"
maxlength="10" placeholder="매물번호 입력"
readonly="readonly">
</div>
</td>
</tr>
<tr>
<th>CP ID</th>
<td><span class="num" id="span_cpid">
<?= $data['cpid'] ?>
</span></td>
</tr>
<tr>
<th>현재 상태</th>
<td><span class="num" id="span_current_stat">
<?= $data['pre_stat'] ?>
</span>
</td>
</tr>
<tr>
<th>등기부등본<br />불일치횟수</th>
<td><?= $data['reg_try_cnt'] ?? '0' ?></td>
</tr>
<tr>
<th>참고용 파일</th>
<td>
<?php
if (!empty($data['certRegister'])) {
$arrCertRegister = json_decode($data['certRegister']);
if (!empty($arrRefrenceFileUrl)):
foreach ($arrCertRegister as $rows) {
$file_ext = trim(parseurl($rows));
if ($file_ext == 'pdf') {
echo '<a onclick="fn_preview(' . $rows . ')" target="_blank"><img id="reference" src="/img/pdf.png" alt="Image" style="max-height: 50px;"/></a>';
} elseif ($file_ext == 'zip') {
echo '<a onclick="fn_preview(' . $rows . ')"><img id="reference" src="/img/zip.png" alt="Image" /></a>';
} else {
echo '<a onclick="fn_preview(' . $rows . ')" rel="lightbox[gallery2]"><img id="reference" src="' . $rows . '" alt="Image" style="padding-right: 10px; max-height: 50px;" /></a>';
}
}
endif;
}
if (!empty($data['referenceFileUrl'])) {
$arrRefrenceFileUrl = json_decode($data['referenceFileUrl']);
if (!empty($arrRefrenceFileUrl)):
foreach ($arrRefrenceFileUrl as $rows) {
$file_ext = trim(parseurl($rows));
if ($file_ext == 'pdf') {
echo '<a target="_blank"><img id="reference" src="/plugin/img/pdf.png" alt="Image" style="height: 50px;"/></a>';
} elseif ($file_ext == 'zip') {
echo "<a href=\"$rows\"><img id=\"reference\" src=\"/plugin/img/zip.png\" alt=\"Image\" /></a>";
} else {
echo "<a onclick=\"fn_preview('$rows')\" rel=\"lightbox[gallery2]\"><img id=\"reference\" src=\"$rows\" alt=\"Image\" style=\"padding-right: 10px; height: 50px;\" /></a>";
}
}
endif;
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 매물 정보 -->
<div class="main-card mb-3 card">
<div class="card-header">
<span class="fw-semibold">매물 정보</span>
</div>
<div class="card-body p-2">
<table class="table table-sm mb-0 tbl_basic2 align-middle" id="info_table">
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th>등록일시</th>
<td>
<span id="span_rdate"><?= $data['rdate'] ?></span>
</td>
</tr>
<tr>
<th>등기부 고유번호</th>
<td><?= $data['registerBookUniqueNumber'] ?></td>
</tr>
<tr>
<th>의뢰인(매도자)</th>
<td>
<span id="span_seller_nm"><?= $data['seller_nm'] ?></span>
</td>
</tr>
<tr>
<th>매물구분</th>
<td>
<span id="span_rlet_type_nm"><?= $data['atcl_nm'] ?></span>
</td>
</tr>
<?php if ($data['vrfc_type_cd'] !== "O"): ?>
<tr>
<th>지역구분</th>
<td>
<?= $data['address1'] ?>
</td>
</tr>
<tr>
<th>사용승인일</th>
<td style=" color:#FF0000;">
<?= $data['sm_apporval_date'] ?>
</td>
</tr>
<tr>
<th>승인종료일</th>
<td style=" color:#FF0000;">
<?= $data['sm_end_date'] ?>
</td>
</tr>
<?php if (!empty($detail_hscp)): ?>
<?php
$apt_rlet_type_cd = array('A01', 'A02', 'A03', 'A04', 'B01', 'B02', 'B03');
$villa_rlet_type_cd = array('A05', 'A06');
?>
<tr>
<th>단지 정보</th>
<td>
<?php if (in_array($detail_hscp['aptType'], $apt_rlet_type_cd)): ?>
<table width="100%">
<tr>
<th>단지명</th>
<td colspan="3">
<?php echo $detail_hscp['aptName']; ?>
</td>
</tr>
<tr>
<th>단지주소</th>
<td colspan="3"><?php echo $detail_hscp['addr']; ?>
</td>
</tr>
<tr>
<th>상세주소</th>
<td colspan="3">
<?php echo $detail_hscp['dtlAddr']; ?>
</td>
</tr>
<tr>
<th>사용승인일</th>
<td><?php echo $detail_hscp['useAprvYmd']; ?></td>
<th>단지 총 동수</th>
<td><?php echo $detail_hscp['dongCount']; ?></td>
</tr>
</table>
<?php endif; ?>
<?php if (in_array($detail_hscp['villaType'], $villa_rlet_type_cd)): ?>
<table width="100%">
<tr>
<th>단지명</th>
<td><?php echo $detail_hscp['villaName']; ?></td>
<th>단지타입명</th>
<td><?php echo $detail_hscp['villaTypeName']; ?>
</td>
</tr>
<tr>
<th>소재법정동번호</th>
<td colspan="3">
<?php echo $detail_hscp['cortarNo']; ?>
</td>
</tr>
<tr>
<th>소재 주소(전체)</th>
<td colspan="3"><?php echo $detail_hscp['addr']; ?>
</td>
</tr>
<tr>
<th>주소(광역시/도)</th>
<td><?php echo $detail_hscp['city']; ?></td>
<th>주소(시군구)</th>
<td><?php echo $detail_hscp['dvsn']; ?></td>
</tr>
<tr>
<th>주소(읍면동)</th>
<td><?php echo $detail_hscp['sec']; ?></td>
<th>소재 동이하 상세주소</th>
<td><?php echo $detail_hscp['dtlAddr']; ?></td>
</tr>
<tr>
<th>단지 총 세대수</th>
<td><?php echo $detail_hscp['totHsehCnt']; ?></td>
<th>단지 총 동수 </th>
<td><?php echo $detail_hscp['totDongCnt']; ?></td>
</tr>
</table>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<tr>
<th>리 주소</th>
<td>
<?= $data['address2a'] ?>
</td>
</tr>
<tr>
<th>상세주소</th>
<td>
<?php if (!empty($data['address2b'])) { ?>
<span>
<?= $data['address2b'] ?>
</span><br />
<?php } else { ?>
<span>
<?= $data['address2'] ?>
</span><br />
<?php } ?>
<span>
<?= $data['address3'] ?>
</span><br />
</td>
</tr>
<tr>
<th>기타주소</th>
<td>
<?= $data['address4'] ?>
</td>
</tr>
<?php endif; ?>
<tr>
<th>거래구분/가격</th>
<td>
<?= $data['trade_type'] ?> /
<?= $data['deal_amt'] ?> 만원
<?= $data['wrrnt_amt'] ?> /
<?= $data['lease_amt'] ?>만원 (월)
</td>
</tr>
<tr>
<th>평형</th>
<td>
<?= $data['ptp_nm'] ?>
</td>
</tr>
<tr>
<th>
<?php
$chk_product_nm = [
'C04', // 전원주택
'D03', // 빌딩,건물
'D04', // 상가,건물
'E01', // 숙박,콘도
'E02', // 공장,창고
'Z00' // 기타
];
if ($data['rlet_type_cd'] == 'C03' && $data['trade_type'] == '매매') {
// 단독,다가구 - 매매
$th = "지하층 / 지상층";
} else if ($data['rlet_type_cd'] == 'C01' && $data['trade_type'] == '매매') {
$th = "지하층 / 지상층";
} else if ($data['rlet_type_cd'] == 'C05' && $data['trade_type'] == '매매') {
// 상가주택 - 매매
$th = "지하층 / 지상층";
} else if (in_array($data['rlet_type_cd'], $chk_product_nm)) {
$th = "지하층 / 지상층";
} else {
$th = "층 / 총층";
}
echo $th;
?>
</th>
<td>
<?= $data['floor'] . "/" . $data['floor2']; ?>
</td>
</tr>
<?php if ($data['hscplqry_lv'] == "3"): ?>
<tr>
<th>공급면적</th>
<td>
<span style="color:#F21E1E">
<?= $data['sply_spc'] ?>
</span>
</td>
</tr>
<tr>
<th>전용면적</th>
<td>
<span style="color:#F21E1E">
<?= $data['excls_spc'] ?>
</span>
</td>
</tr>
<?php endif; ?>
<?php if ($data['rlet_type_cd'] == 'A01' || $data['rlet_type_cd'] == 'A02'): ?>
<tr>
<th>단지명</th>
<td>
<?php echo $data['hscp_nm'] ?>
<?php if ($data['sm_seq'] !== null): ?>
<span style='color:#FF0000'>※ 특이단지</span>
<?php endif; ?>
</td>
</tr>
<?php endif; ?>
<?php if ($data['rlet_type_cd'] == 'F01'): ?>
<tr>
<th>재개발구역명</th>
<td>
<?= $data['redvlp_area_nm'] ?>
</td>
</tr>
<tr>
<th>사업단계설명</th>
<td>
<?= $data['biz_stp_desc'] ?>
</td>
</tr>
<?php endif; ?>
<?php if (empty($data['hscp_no'])):
if ($data['rlet_type_cd'] == 'C01' || $data['rlet_type_cd'] == 'C02' || ($data['rlet_type_cd'] == 'C03' and $data['trade_type_cd'] != 'A1') || $data['rlet_type_cd'] == 'D02' || $data['rlet_type_cd'] == 'D01' || $data['rlet_type_cd'] == 'E04'):
?>
<tr>
<th>공급면적</th>
<td>
<span style="color:#002EE7">
<?= $data['sply_spc'] ?>
</span>
</td>
</tr>
<tr>
<th>전용면적</th>
<td>
<span style="color:#002EE7">
<?= $data['excls_spc'] ?>
</span>
</td>
</tr>
<?php
elseif (
($data['rlet_type_cd'] == 'C03' and $data['trade_type_cd'] == 'A1') ||
$data['rlet_type_cd'] == 'C04' ||
($data['rlet_type_cd'] == 'C05' and $data['trade_type_cd'] == 'A1') ||
$data['rlet_type_cd'] == 'D03' ||
$data['rlet_type_cd'] == 'D04' ||
$data['rlet_type_cd'] == 'E01' ||
$data['rlet_type_cd'] == 'E02' ||
$data['rlet_type_cd'] == 'Z00'
): ?>
<tr>
<th>대지면적</th>
<td>
<span style="color:#002EE7">
<?= $data['grnd_spc'] ?>
</span>
</td>
</tr>
<tr>
<th>연면적</th>
<td>
<span style="color:#002EE7">
<?= $data['tot_spc'] ?>
</span>
</td>
</tr>
<?php elseif ($data['rlet_type_cd'] == 'C04'): ?>
<tr>
<th>대지면적</th>
<td>
<span style="color:#002EE7"><?= $data['grnd_spc'] ?></span>
</td>
</tr>
<tr>
<th>건축면적</th>
<td>
<span style="color:#002EE7"><?= $data['bldg_spc'] ?></span>
</td>
</tr>
<?php
endif;
endif; ?>
<?php
$vir_style = "";
if ($data['vir_addr_yn'] == 'Y') {
$vir_style = "style='color:#F21E1E;'";
}
// 소유자 구분
switch ($data['ownerTypeCode']):
case "0":
$strOwnerTypeCode = "개인";
break;
case "1":
$strOwnerTypeCode = "법인";
break;
case "2":
$strOwnerTypeCode = "외국인";
break;
case "3":
$strOwnerTypeCode = "위임장";
break;
endswitch;
?>
<tr>
<th>가주소 여부</th>
<td>
<span <?= $vir_style ?>>
<?= $data['vir_addr_yn'] ?>
</span>
</td>
</tr>
<tr>
<th>소유자 구분</th>
<td><span style='color:#F21E1E'>
<?= $strOwnerTypeCode ?>
</span></td>
</tr>
<tr>
<th>검증참고란</th>
<td>
<?= $data['registerBookUniqueNo'] ?>
</td>
</tr>
<tr>
<th>미등기 검증요청 여부</th>
<td>
<?= $data['noRgbkVrfcReqYn'] ?>
</td>
</tr>
<tr>
<th>건축물대장 <br />면적 검증요청</th>
<td>
<?= $data['areaByBdbkVrfcReqYn'] ?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- 확인정보 -->
<div class="main-card mb-3 card">
<div class="card-header">
<span class="fw-semibold">확인 정보</span>
</div>
<div class="card-body p-2">
<table class="table table-sm mb-0 tbl_basic2 align-middle" id="info_table">
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<tr>
<th>확인담당자</th>
<td>
<?= $data['reg_charger_nm'] ?>
&nbsp; &nbsp; &nbsp;
<button type="button" class="btn btn-sm btn-outline-light"
onClick="window.open('https://www.realtop.co.kr/cm/CMMBR01C2.asp2?cmInstCd=Z265&cmUserNo=<?= $usr_id ?>&cmKey=nxfT5VLGXg&cmName=<?= $usr_id ?>&cmDNm=confirms&cmAutoLogInYn=Y&cmUrl=/re/NVRET01R0&cmEncoding=UTF-8')">
등기부등본 열람
</button>
</td>
</tr>
<?php if ($data['vrfc_type_sub'] == 'M1' || $data['vrfc_type_sub'] == 'O1' || $data['vrfc_type_sub'] == 'N2'): ?>
<tr>
<th>등기부등본 <br />미확인여부<br />상세</th>
<td>
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<input type="hidden" name="arr_uncnfrm_status"
id="arr_uncnfrm_status" />
<tr>
<?php
$cnt = 0;
$code_comment = [];
foreach ($codes as $c) {
if ($c['category'] === "CERT_UNCNFRM_STATUS") {
array_push($code_comment, $c);
}
}
foreach ($code_comment as $key => $value) {
if ($cnt % 2 == 0 && $cnt != 0) {
echo '</tr><tr>';
}
?>
<td
style="border: 0; padding:2px 0 2px 0; height:18px;">
<div
class="form-check d-flex align-items-center mb-0 chk-uncnfrm">
<input class="form-check-input mt-0"
type="checkbox"
id="c_u_s_<?= $value['cd'] ?>"
name="cert_uncnfrm_status[]"
value="<?= $value['cd'] ?>" />
<label class="form-check-label ms-1 small"
for="c_u_s_<?= $value['cd'] ?>">
<?= $value['cd_nm'] ?>
</label>
</div>
</td>
<?php $cnt++;
} ?>
<?php if ($cnt > 0) { ?>
</tr>
<?php } ?>
</table>
</td>
</tr>
<?php endif; ?>
<?php
$dcm_array = json_decode($data['document_cert_method'], true);
if (!is_array($dcm_array))
$dcm_array = [];
$methods = ['사업자등록증', '분양계약서', '명함', '재직증명서', '위임장', '기타'];
$isDisabled = ($data['pre_stat_cd'] ?? '') === '60';
$disabledAttr = $isDisabled ? ' disabled="disabled"' : '';
?>
<tr>
<th>서류확인내용</th>
<td>
<?php foreach ($methods as $i => $method): ?>
<?php
$id = 'document_cert_method' . ($i + 1);
$checkedAttr = in_array($method, $dcm_array, true) ? ' checked="checked"' : '';
?>
<label for="<?= $id ?>" style="margin-right:10px;">
<input type="checkbox" class="form-check-input mt-0"
name="document_cert_method[]" id="<?= $id ?>"
value="<?= htmlspecialchars($method, ENT_QUOTES, 'UTF-8') ?>"
<?= $checkedAttr . $disabledAttr ?>>
<?= htmlspecialchars($method, ENT_QUOTES, 'UTF-8') ?>
</label>
<?php endforeach; ?>
</td>
</tr>
<tr>
<th>확인내용</th>
<td>
<select class="form-select" name="reg_conf_yn_1"
id="reg_conf_yn_1">
<option value="">-선택-</option>
<option value="1" <?php if ($data['reg_conf_yn_1'] == '1')
echo "selected"; ?>>전체일치</option>
<option value="2" <?php if ($data['reg_conf_yn_1'] == '2')
echo "selected"; ?>>전체불일치</option>
</select>
</td>
</tr>
<tr>
<th>매물주소</th>
<td class="d-flex gap-1">
<select class="form-select" name="reg_conf_yn_2"
id="reg_conf_yn_2">
<option value="">-선택-</option>
<option value="10000" <?php if ($data['reg_conf_yn_2'] == '10000')
echo "selected"; ?>>일치</option>
<option value="20000" <?php if ($data['reg_conf_yn_2'] == '20000')
echo "selected"; ?>>불일치</option>
</select>
<input type="text" class="form-control"
name="reg_conf_yn_info_2" id="reg_conf_yn_info_2"
value="<?= str_replace(',', '', $data['reg_conf_yn_info_2']) ?>"
size="20" />
</td>
</tr>
<tr>
<th>의뢰인정보</th>
<td class="d-flex gap-1">
<select class="form-select" name="reg_conf_yn_3"
id="reg_conf_yn_3">
<option value="">-선택-</option>
<option value="10000" <?php if ($data['reg_conf_yn_3'] == '10000')
echo "selected"; ?>>일치</option>
<option value="20000" <?php if ($data['reg_conf_yn_3'] == '20000')
echo "selected"; ?>>불일치</option>
</select>
<input type="text" class="form-control"
name="reg_conf_yn_info_3" id="reg_conf_yn_info_3"
value="<?= str_replace(',', '', $data['reg_conf_yn_info_3']) ?>"
size="20" />
</td>
</tr>
<?php if ($data['vrfc_type_sub'] == 'D2'): ?>
<tr>
<th>실소유주 확인</th>
<td>
<input type="radio" name="owner_verifiable"
id="owner_verifiable" value="true"
style="vertical-align:middle;" <?php if ($data['owner_verifiable'] == 'true')
echo 'checked="checked"';
if (empty($regi_pdf_path) == true) {
echo "disabled";
} ?> />확인&nbsp;
<input type="radio" name="owner_verifiable"
id="owner_verifiable" value="false"
style="vertical-align:middle;" <?php if ($data['owner_verifiable'] == 'false')
echo 'checked="checked"'; ?> />미확인
</td>
</tr>
<?php endif; ?>
<tr>
<th>매도자명</th>
<td>
<?= $data['seller_nm'] ?>
</td>
</tr>
<tr>
<th>소유자명</th>
<td>
<?= $data['ownerNm'] ?>
</td>
</tr>
<tr>
<th>소유자명 확인</th>
<td>
<?php if ($data['ownerTypeCode'] != '1'): ?>
<input type="radio" name="owner_verifiable"
id="owner_verifiable" value="1" <?php if ($data['owner_verifiable'] === "1")
echo "checked"; ?>>
일치
<?php endif; ?>
<input type="radio" name="owner_verifiable"
id="owner_verifiable" value="0" <?php if ($data['owner_verifiable'] === "0")
echo "checked"; ?>>
불일치
</td>
</tr>
<tr>
<th>메모</th>
<td>
<textarea name="memo" id="memo"
style="width:300px; height:45px;"
readonly><?= $memo['memo'] ?></textarea>
</td>
</tr>
<tr>
<th>등기부등본 확인</th>
<td class="d-flex gap-1">
<input type="checkbox" class="form-check-input mt-0"
name="img_chk_chk" id="img_chk_chk3" value="O"
style="vertical-align:middle;"
onclick="check_only(this)" />
<span id="img_chk_chk3_label" class="padd_r">
<label for="img_chk_chk3">열람</label></span>
<? if ($data['vrfc_type_sub'] == 'D2') { //홍보확인서 v2일경우
?>
<span id="img_chk_chk4_label">
<input type="checkbox" class="form-check-input mt-0"
name="img_chk_chk_4" id="img_chk_chk4" value="O"
style="vertical-align:middle;" />
소유자명 확인 &nbsp; &nbsp; &nbsp;
</span>
<?
}
if ($display['display_yn'] == 'Y') {
?>
<input type="checkbox" class="form-check-input mt-0"
name="img_chk_chk" id="img_chk_chk5" value="R"
style="vertical-align:middle;"
onclick="check_only(this)" />
<span id="img_chk_chk5_label" class="padd_r">
<label for="img_chk_chk5">리얼탑 열람</label></span>
<input type="checkbox" class="form-check-input mt-0"
name="img_chk_chk" id="img_chk_chk6" value="G"
style="vertical-align:middle;"
onclick="check_only(this)" />
<span id="img_chk_chk6_label" class="padd_r">
<label for="img_chk_chk6">리얼탑 기열람</label></span>
<input type="checkbox" class="form-check-input mt-0"
name="img_chk_chk" id="img_chk_chk2" value="T"
style="vertical-align:middle;"
onclick="check_only(this)" />
<span id="img_chk_chk2_label" class="padd_r">
<label for="img_chk_chk2">등기소</label></span>
<?
}
?>
<input type="checkbox" class="form-check-input mt-0"
name="noimg_chk_chk" id="noimg_chk_chk" value="Y"
style="vertical-align:middle;" />
<span id="noimg_chk_chk_label" class="padd_r">
<label for="noimg_chk_chk">이미지 파일 없음</label> </span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="main-card mb-3 card">
<div class="card-header">
<span class="fw-semibold">기타 정보</span>
</div>
<div class="card-body p-2">
<table class="table table-sm mb-0 tbl_basic2 align-middle" id="info_table">
<colgroup>
<col style="width: 120px;">
<col>
</colgroup>
<tbody>
<?php if (in_array($data['vrfc_type_sub'], array('M1', 'O1', 'D2'))): ?>
<tr>
<th width="105">소유자명</th>
<td style="color:#ff0000;">
<?php
if ($data['stat_cd'] == '19' || $data['stat_cd'] == '60' || $data['stat_cd'] == '69') {
echo ('***');
} else {
echo ($data['ownerNm']);
}
?>
</td>
</tr>
<?php endif; ?>
<?php
$sty = '';
if ($data['vrfc_type_cd'] == 'M') {
$sty = 'style="display:none;"';
}
?>
<tr <?= $sty ?>>
<th width="105">소유자 전화번호</th>
<td>
<?php
if ($data['stat_cd'] == '19' || $data['stat_cd'] == '60' || $data['stat_cd'] == '69') {
echo ('***');
} else {
echo ($data['ownerTelNo']);
}
?>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="main-card card">
<div class="card-body d-flex justify-content-end gap-1">
<?php if ($data['vrfc_type_cd'] == 'N'):
if ($data['stat_cd'] < '45' && $data['stat_cd'] >= '35' && $data['stat_cd'] != '39' && $data['stat_cd'] != '49'):
?>
<button class="btn btn-sm btn-outline-success"
onclick="saveRegi()">전송</button>
<?php endif;
endif; ?>
<!-- <button class="btn btn-sm btn-outline-primary" onclick="">저장</button> -->
<button class="btn btn-sm btn-outline-light"
onclick="nextRegi();">다음</button>
</div>
</div>
</td>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<?= $this->section('modals') ?>
<div class="modal" id="previewModal" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">미리보기</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body p-0">
<img id="imgPreview" src="" alt="미리보기" width="100%" height="auto">
</div>
</div>
</div>
</div>
<div class="modal fade" id="uploadModal" tabindex="-1">
<div class="modal-dialog modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">파일 업로드</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body p-0">
<form id="frm_file_info" method="post" enctype="multipart/form-data" onsubmit="return false;">
<input type="hidden" name="vr_sq" value="<?= $data['vr_sq'] ?>">
<!-- 버튼 툴바 -->
<div class="d-flex justify-content-end gap-2 mb-3" style="padding: 16px 10px 0 0;">
<button type="button" class="btn btn-primary" id="uploadPick">
<i class="pe-7s-up-arrow"></i> 파일선택
</button>
<button type="button" class="btn btn-success" id="btnUpload">
<i class="pe-7s-up-arrow"></i> 파일업로드
</button>
<button type="button" class="btn btn-danger" id="btnRemove">
<i class="pe-7s-less"></i> 업로드취소
</button>
</div>
<!-- Dropzone 영역 -->
<div id="myDropzone" class="dropzone border rounded-3 p-4"
style="max-height: 400px;overflow-y: scroll;">
<div class="dz-message dz-message-fixed needsclick text-center">
<i class="pe-7s-upload mb-2" style="font-size:42px;"></i><br>
<strong class="fs-6">파일을 드래그하거나 클릭해서 추가하세요</strong><br>
<small class="text-muted">
사진 여러 장 가능 / 동영상은 1개만
</small>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?= $this->endSection() ?>
<script src="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone-min.js"></script>
<link href="https://unpkg.com/dropzone@6.0.0-beta.1/dist/dropzone.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var reg_file_yn = '<?= $yn ?>';
var reg_status = '<?= $data['reg_status'] ?>';
var filePdf = '<?= $file_pdf ?>';
$(function () {
if (reg_status == 'Y') {
// 등기부등본 없음 체크하기
$("#noimg_chk_chk").attr("checked", true);
$("#noimg_chk_chk").val("Y");
} else if (reg_status == 'O') {
// 등기부등본 열람
$("#img_chk_chk3").attr("checked", true);
$("#img_chk_chk3").val("O");
} else if (reg_status == 'T') {
// 등기소
$("#img_chk_chk2").attr("checked", true);
$("#img_chk_chk2").val("T");
} else if (reg_status == 'R') {
// 리얼탑 열람
$("#img_chk_chk5").attr("checked", true);
$("#img_chk_chk5").val("R");
} else if (reg_status == 'G') {
// 리얼탑 기열람
$("#img_chk_chk6").attr("checked", true);
$("#img_chk_chk6").val("G");
}
//등기부등본확인 정보 : 확인 내용
$("#reg_conf_yn_1").change(function () {
if ($("#reg_conf_yn_1").val() == "1") {
$("#reg_conf_yn_2").val("10000");
$("#reg_conf_yn_3").val("10000");
} else if ($("#reg_conf_yn_1").val() == "2") {
$("#reg_conf_yn_2").val("20000");
$("#reg_conf_yn_3").val("20000");
$("#reg_conf_yn_info_3").val("소유주 불일치");
}
});
<?php
if (strtolower($file_pdf) == 'pdf') {
?>
$("#regi_file_dis").hide();
<?php } ?>
if (filePdf == 'pdf' || filePdf == 'PDF') { //열람
$('#noimg_chk_chk').hide();
$('#noimg_chk_chk_label').hide();
$('#img_chk_chk2').hide();
$('#img_chk_chk2_label').hide();
$('#img_chk_chk5').hide();
$('#img_chk_chk5_label').hide();
$('#img_chk_chk6').hide();
$('#img_chk_chk6_label').hide();
} else if (filePdf == '' || filePdf == null) { //이미지없음
$('#img_chk_chk3').hide();
$('#img_chk_chk3_label').hide();
$('#img_chk_chk2').hide();
$('#img_chk_chk2_label').hide();
$('#img_chk_chk4_label').hide();
$('#img_chk_chk5').hide();
$('#img_chk_chk5_label').hide();
$('#img_chk_chk6').hide();
$('#img_chk_chk6_label').hide();
} else { //pdf이외 이미지 있음
$('#noimg_chk_chk').hide();
$('#noimg_chk_chk_label').hide();
$('#img_chk_chk3').hide();
$('#img_chk_chk3_label').hide();
$('#img_chk_chk4_label').hide();
}
// 등기부등본 미확인여부 checkbox
$(".chk-uncnfrm").on("change", function (e) {
const labelText = $("label[for=" + e.target.id + "]").text().trim();
const id = e.target.id;
const value = e.target.value;
if (value == 20099 && $("input:checkbox[id=" + id + "]").is(":checked")) {
$("input:checkbox[name='cert_uncnfrm_status[]']").prop("checked", false);
$("input:checkbox[id=" + id + "]").prop("checked", true);
$("#reg_conf_yn_1").val("2").prop("selected", true);
$("#reg_conf_yn_2").val("20000").prop("selected", true);
$("#reg_conf_yn_3").val("20000").prop("selected", true);
$("#reg_conf_yn_info_2").val('');
$("#reg_conf_yn_info_3").val('');
} else {
var txt = "";
var txt2 = "";
var status = "";
var cnt_juso = 0; //매물주소
var status_juso = "";
var cnt_info = 0; //의뢰인정보
var status_info = "";
var cnt_99 = 0; //기타
$('input:checkbox[name="cert_uncnfrm_status[]"]').each(function () {
if ($(this).is(':checked')) {
status = $(this).val();
switch (status) {
case '20099':
cnt_99++;
break;
case '20016':
case '20023':
cnt_info++;
status_info = status;
break;
default:
cnt_juso++;
status_juso = status;
}
}
});
if (cnt_juso > 0 && cnt_info > 0) {
$("#reg_conf_yn_1").val("20000").prop("selected", true);
$("#reg_conf_yn_2").val("20000").prop("selected", true);
$("#reg_conf_yn_3").val("20000").prop("selected", true);
txt = $('label[for="c_u_s_' + status_juso + '"]').text();
txt2 = $('label[for="c_u_s_' + status_info + '"]').text();
$("#reg_conf_yn_info_2").val(txt);
$("#reg_conf_yn_info_3").val(txt2);
} else if (cnt_juso == 0 && cnt_info > 0) {
txt = $('label[for="c_u_s_' + status_info + '"]').text();
$("#reg_conf_yn_1").val("").prop("selected", true);
$("#reg_conf_yn_2").val("").prop("selected", true);
$("#reg_conf_yn_3").val("20000").prop("selected", true);
$("#reg_conf_yn_info_2").val('');
$("#reg_conf_yn_info_3").val(txt);
if (cnt_99 > 0) {
$("input:checkbox[id='c_u_s_20099']").prop("checked", false);
$("#reg_conf_yn_1").val("").prop("selected", true);
}
} else if (cnt_juso > 0 && cnt_info == 0) {
txt = $('label[for="c_u_s_' + status_juso + '"]').text();
$("#reg_conf_yn_1").val("").prop("selected", true);
$("#reg_conf_yn_2").val("20000").prop("selected", true);
$("#reg_conf_yn_3").val("").prop("selected", true);
$("#reg_conf_yn_info_2").val(txt);
$("#reg_conf_yn_info_3").val('');
if (cnt_99 > 0) {
$("input:checkbox[id='c_u_s_20099']").prop("checked", false);
$("#reg_conf_yn_1").val("").prop("selected", true);
}
} else if (cnt_juso == 0 && cnt_info == 0) {
$("#reg_conf_yn_1").val("").prop("selected", true);
$("#reg_conf_yn_2").val("").prop("selected", true);
$("#reg_conf_yn_3").val("").prop("selected", true);
$("#reg_conf_yn_info_2").val('');
$("#reg_conf_yn_info_3").val('');
}
}
});
/**
* 파일 Dropzone
* */
const dz = new Dropzone("#myDropzone", {
url: "/m705/m705a/uploadFile",
method: "post",
paramName: "files",
autoProcessQueue: false, // 자동 업로드 끄기
uploadMultiple: false,
parallelUploads: 20,
maxFilesize: 100,
// acceptedFiles: '.ogg,.mp3,.wma,.wav,.au,.rm,.mid,.MP3,.OGG,.WMA,.WAV,.AU,.RM,.MID,.gsm',
addRemoveLinks: true,
dictRemoveFile: "삭제",
dictDefaultMessage: "파일을 여기에 드래그하거나 클릭해서 추가하세요",
dictFallbackMessage: "브라우저가 드래그앤드롭을 지원하지 않습니다.",
dictFileTooBig: "파일이 너무 큽니다 (최대 {{maxFilesize}}MB)",
dictInvalidFileType: "허용되지 않은 파일 형식입니다.",
dictResponseError: "서버 오류가 발생했습니다.",
dictCancelUpload: "업로드 취소",
dictRemoveFile: "삭제",
dictMaxFilesExceeded: "더 이상 파일을 추가할 수 없습니다.",
init: function () {
this.on("addedfile", function (file) {
if (this.files.length > 1) {
alert("파일은 1개만 업로드할 수 있습니다.");
this.removeFile(file);
return;
}
});
},
});
dz.on("addedfile", function (file) {
const removeBtn = file.previewElement.querySelector(".dz-remove");
if (removeBtn) {
removeBtn.classList.add(
"btn",
"btn-sm",
"btn-outline-danger",
"mt-2"
);
}
});
let isFormDataAppended = false;
dz.on("sending", function (file, xhr, formData) {
if (isFormDataAppended) return;
formData.append("vr_sq", $("#frm_file_info [name=vr_sq]").val());
isFormDataAppended = true;
});
dz.on("queuecomplete", function () {
location.reload();
});
dz.on("successmultiple", function () {
isFormDataAppended = false;
});
dz.on("errormultiple", function () {
isFormDataAppended = false;
});
dz.on("canceledmultiple", function () {
isFormDataAppended = false;
});
dz.on("processingmultiple", function () { });
// 업로드파일 선택
$("#uploadPick").on("click", function () {
isFormDataAppended = false;
dz.hiddenFileInput.click();
});
$("#btnUpload").on("click", function () {
dz.processQueue(); // 업로드 실행
isFormDataAppended = false;
});
$("#btnRemove").on("click", function () {
const files = dz.getAcceptedFiles();
if (files.length === 0) {
alert("삭제할 파일이 없습니다.");
return;
}
files.forEach(function (file) {
dz.removeFile(file);
});
});
// 파일업로드 open
$("#btnUploadModal").on("click", function () {
$("#uploadModal").modal("show");
});
});
function check_only(chk) {
var obj = document.getElementsByName("img_chk_chk");
for (var i = 0; i < obj.length; i++) {
if (obj[i] != chk) {
obj[i].checked = false;
}
}
}
// 이미지회전
function faximage_rotate(degress) {
swal.fire({
text: "현재 이미지를 회전시켜 저장하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
const data = {
'vr_sq': '<?= $data['vr_sq'] ?>',
'degress': degress,
};
$.ajax({
url: '/m712/m712a/rotateImage',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: data,
beforeSend: function () {
blockUI.blockPage({
message: tpl
})
},
complete: function () {
blockUI.unblockPage()
},
error: function (xhr, error, thrown) {
blockUI.unblockPage()
var msg = "";
if (xhr.responseText != null) {
msg = xhr.responseText
} else {
msg = "잠시후 다시 시도해 주세요."
}
Swal.fire({
title: msg,
icon: "error"
})
},
success: function (result) {
if (result.code == '0') {
Swal.fire({
title: '정상 처리되었습니다.',
icon: "success"
});
location.reload();
} else {
Swal.fire({
title: result.msg,
icon: "error"
})
}
}
});
}
});
}
// 서류미수취 저장
function save_document_not_received() {
swal.fire({
text: "변경된 정보를 저장하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
const data = {
'vr_sq': '<?= $data['vr_sq'] ?>',
'atcl_no': '<?= $data['atcl_no'] ?>'
};
$.ajax({
url: '/m712/m712a/saveNotReceived',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: data,
beforeSend: function () {
blockUI.blockPage({
message: tpl
})
},
complete: function () {
blockUI.unblockPage()
},
error: function (xhr, error, thrown) {
blockUI.unblockPage()
var msg = "";
if (xhr.responseText != null) {
msg = xhr.responseText
} else {
msg = "잠시후 다시 시도해 주세요."
}
Swal.fire({
title: msg,
icon: "error"
})
},
success: function (result) {
if (result.code == '0') {
Swal.fire({
title: '정상 처리되었습니다.',
icon: "success"
});
location.reload();
} else {
Swal.fire({
title: result.msg,
icon: "error"
})
}
}
});
}
});
}
// 정보저장
function saveRegi() {
}
//다음매물확인
function nextRegi() {
swal.fire({
text: "다음 등기부등본 이미지를 불러오시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
const data = {
'vr_sq': '<?= $data['vr_sq'] ?>'
};
$.ajax({
url: '/m705/m705a/getNextInfo',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: data,
beforeSend: function () {
blockUI.blockPage({
message: tpl
})
},
complete: function () {
blockUI.unblockPage()
},
error: function (xhr, error, thrown) {
blockUI.unblockPage()
var msg = "";
if (xhr.responseText != null) {
msg = xhr.responseText
} else {
msg = "잠시후 다시 시도해 주세요."
}
Swal.fire({
title: msg,
icon: "error"
})
},
success: function (result) {
if (result.code == '0') {
if (result.res != null) {
location.replace("<?= site_url('m705/m705a/detail') ?>/" + result.res);
} else {
Swal.fire({
title: "파일이 존재하지 않습니다.",
icon: "error"
});
}
} else {
Swal.fire({
title: result.msg,
icon: "error"
})
}
}
});
}
});
}
// 이미지 프리뷰
function fn_preview(src) {
const $img = $('#imgPreview');
// 이미지 표시
$img.attr('src', src).show();
$('#previewTitle').text('이미지 미리보기');
const modal = new bootstrap.Modal(document.getElementById('previewModal'));
modal.show();
}
</script>
<?= $this->endSection() ?>