Compare commits

...

2 Commits

Author SHA1 Message Date
fc4ce793e3 상세수정
Reviewed-on: http://192.168.10.243:3000/owrainfo/confirms/pulls/51
2026-02-05 10:37:22 +09:00
yangsh
36355f75f3 상세수정
Some checks failed
Close Pull Request / main (pull_request_target) Has been cancelled
2026-02-05 10:36:12 +09:00
12 changed files with 2939 additions and 1028 deletions

View File

@@ -206,6 +206,7 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
$routes->post('m702a/updateAssign', 'M702::updateAssign'); // 배정변경 $routes->post('m702a/updateAssign', 'M702::updateAssign'); // 배정변경
$routes->post('m702a/saveTel', 'M702::saveTel'); // 전화확인 정보 저장 $routes->post('m702a/saveTel', 'M702::saveTel'); // 전화확인 정보 저장
$routes->post('m702a/modifyInfo', 'M702::modifyInfo'); // 매물정보저장 $routes->post('m702a/modifyInfo', 'M702::modifyInfo'); // 매물정보저장
$routes->post('m702a/saveDocu', 'M702::saveDocu'); // 서류정보저장
$routes->post('m702a/uploadFile', 'M702::uploadFile'); // 파일업로드 $routes->post('m702a/uploadFile', 'M702::uploadFile'); // 파일업로드
@@ -297,6 +298,10 @@ $routes->group('', ['namespace' => 'App\Controllers\V2'], static function ($rout
$routes->get('m706a/getResultList', 'M706::getResultList'); $routes->get('m706a/getResultList', 'M706::getResultList');
$routes->get('m706a/excel', 'M706::excel'); $routes->get('m706a/excel', 'M706::excel');
$routes->post('m706a/modifyInfo', 'M706::modifyInfo'); // 매물정보 저장
$routes->post('m706a/saveDocu', 'M706::saveDocu'); // 서류정보 저장
$routes->post('m706a/saveRegi', 'M706::saveRegi'); // 등기부등본 저장
}); });
/** /**

View File

@@ -1006,4 +1006,211 @@ class M702 extends BaseController
]); ]);
} }
} }
// 서류확인정보 저장
public function saveDocu()
{
/*
1.0.1 POST 데이터 받기.
1.1.1 1차 검증인지 2차검증인지 확인.
1.1.2 1차, 2차 검증이면 v2_confirm.type에 넣을 값을 알맞게 셋팅.
1.2.1 v2_confirms에 데이터가 있는지 확인.
1.3.1 데이터가 있음 : success 여부 판단 후 updateConfirm 실행 success값만 UPDATE. (수정변경이력 저장)
1.4.1 데이터가 없음 : success 여부 판단 후 insertConfirm 실행 v2_confirms INSERT. (수정변경이력 저장)
1.4.2 상태변경 하기 : 전화(서류)확인중 상태로 변경. (수정변경이력 저장)
1.5.1 이미지파일 서버에 UPLOAD (수정변경이력 저장)
1.6.1 기존파일 탐색.
1.7.1 기존파일 있음 : 기존파일 use_yn 'N'으로 UPDATE 후 v2_files INSERT.
1.8.1 기존파일 없음 : v2_files INSERT.
1.9.1 확인여부 + 홍보확인서 미확인여부 상세, 매물주소, 가격거래구분, 의뢰인 정보 v2_check_list INSERT. (수정변경이력 저장)
1.10.1 API 전송.
1.11.1 API 전송결과 : SUCCESS 이면 상태값 변경 : 전화(서류)확인완료 상태. (수정변경이력 저장)
*/
$naver = new NaverApiClient();
$model710 = new M710Model();
$model415 = new M415Model();
$v2DailyModel = new V2StDailyModel();
try {
$usr_id = session('usr_id');
$toDay = date('Y-m-d H:i:s'); //오늘날짜
$atcl_vrtc_way = $this->request->getPost('atcl_vrtc_way');
$atcl_vr_sq = $this->request->getPost('rcpt_key');
$arr = $this->request->getPost('chTotal');
$fax_conf_res_d11 = $this->request->getPost('fax_conf_res_d11');
$fax_conf_yn_1 = $this->request->getPost('fax_conf_yn_1');
$fax_conf_yn_2 = $this->request->getPost('fax_conf_yn_2');
$fax_conf_yn_3 = $this->request->getPost('fax_conf_yn_3');
$fax_conf_yn_4 = $this->request->getPost('fax_conf_yn_4');
$fax_conf_yn_info_2 = $this->request->getPost('fax_conf_yn_info_2');
$fax_conf_yn_info_3 = $this->request->getPost('fax_conf_yn_info_3');
$fax_conf_yn_info_4 = $this->request->getPost('fax_conf_yn_info_4');
$reg_chk_val = $this->request->getPost('reg_chk_val');
$memo = $this->request->getPost('memo_fax');
$try_cnt = '0';
//상태가 이미 등기부등본확인중 이상이면 저장하지 않는다.
$resStat = $this->model->chkStat($atcl_vr_sq);
$v2_vrfc_req = $v2DailyModel->get_v2_vrfc_req($atcl_vr_sq);
if ((int) $resStat['stat_cd'] >= 40 || (int) $resStat['stat_cd'] == '190') {
throw new \Exception('이미 저장된 데이터입니다.');
} else {
$this->model->InsCharger($atcl_vr_sq); //담당자가 없을 경우 강제로 session 정보로 넣어준다
$resultCnt = $this->model->chkTryCnt($atcl_vr_sq); //1차검증인지 2차검증인지 확인 쿼리 : v2_vrfc_req.type_cnt
if ($resultCnt['try_cnt'] == 0) { //1차 검증일 때
$try_cnt = '1';
} else if ($resultCnt['try_cnt'] == 1) { //2차 검증일 때
$try_cnt = '2';
} else {
$try_cnt = intval($try_cnt) + 1;
}
$result = $this->model->chkConfirm($atcl_vr_sq, '');
if ($result == 0) { //v2_confirm 존재하지 않는다면
if ($fax_conf_yn_2 == '10000' && $fax_conf_yn_3 == '10000' && $fax_conf_yn_4 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$this->model->insertConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type, $try_cnt);
} else {
if ($fax_conf_yn_2 == '10000' && $fax_conf_yn_3 == '10000' && $fax_conf_yn_4 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$resUpdate = $this->model->updateConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type);
}
//상태변경 TABLE INSERT : 전화(서류)확인중 상태로 변경
$this->model->chgStat($atcl_vr_sq, '30', $toDay);
$chgVrfc = $this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
//v2_check_list 확인여부 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D11', $fax_conf_res_d11, $arr);
//v2_check_list 매물주소 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D12', $fax_conf_yn_2, $fax_conf_yn_info_2);
//v2_check_list 가격거래구분 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D13', $fax_conf_yn_3, $fax_conf_yn_info_3);
//v2_check_list 의뢰인정보 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D14', $fax_conf_yn_4, $fax_conf_yn_info_4);
//memo 저장
if (!empty($memo)) {
$this->model->saveMemo([
'vr_sq' => $atcl_vr_sq,
'memo' => $memo
]);
}
//API 호출
$sendData = $this->model->getDataConfirmAPI($atcl_vr_sq);
if ($fax_conf_yn_4 == '10000' || (int) $try_cnt < 2) {
$send_result = $naver->confirm($sendData['atclNo'], $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['modifyInfo'], $sendData['date']);
if ($send_result['result'] == 'success') { //HISTORY
if ($fax_conf_res_d11 == '10000' && $chk_type == '1') {
//상태변경 TABLE INSERT : 전화(서류)확인 완료 상태로 변경
$this->model->chgStat($atcl_vr_sq, '35', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '35'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '35'); //fax_imgs
if ($reg_chk_val == '1') {
//등기부등본 확인 대상은 전화(서류)확인 완료 후 -> 등기부등본 확인중 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '40', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '40'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '40'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0201', '1', 'add'); // 일치로 저장
} else {
//등기부등본 확인 대상이 아닌 경우 전화(서류)확인 완료 후 -> 검증 완료 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '60', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '60'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '60'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0205', '1', 'add'); // 홍보확인서완료 등기부등본확인 안함 저장
}
} else {
//상태변경 TABLE INSERT : 전화(서류)확인 불일치
$this->model->chgStat($atcl_vr_sq, '39', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '39'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '39'); //fax_imgs
if ($try_cnt == '1') {
//v2_vrfc_req try_cnt 값을 1로 update
$this->model->chgTryCnt($atcl_vr_sq, '1');
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0301', '1', 'add'); // 1차실패로 저장
} else if ($try_cnt == '2') {
//v2_vrfc_req try_cnt 값을 2로 update
$this->model->chgTryCnt($atcl_vr_sq, '2');
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '69', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0302', '1', 'add'); // 2차실패로 저장
}
if ($fax_conf_res_d11 == '20013') {
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0203', '1', 'add'); // 기타로 저장
} else {
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0202', '1', 'add'); // 불일치로 저장
}
}
} else {
if (isset($send_result['error'])) {
$error_message = $send_result['error']['code'] . "\\n" . $send_result['error']['message'];
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
$err_time = date("Y-m-d H:i:s");
$this->model->saveApiErr($atcl_vr_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
throw new \Exception($error_message);
} else {
throw new \Exception('네이버 전송 중 오류가 발생되었습니다. 다시 시도하세요.');
}
}
} else {
$this->model->chgStat($atcl_vr_sq, '39', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '39'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '39'); //fax_imgs
$this->model->saveHistory($atcl_vr_sq, '30', 'C9', $usr_id, '상태변경 : 39 => 30'); //검증결과 변동사항 HISTORY
$this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '30'); //fax_imgs
throw new Exception('의뢰인정보 불일치로 저장되었습니다.');
}
return $this->response->setJSON(body: [
'code' => '0',
'msg' => '정상적으로 저장되었습니다.',
]);
}
} catch (\Exception $e) {
return $this->response->setJSON(body: [
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
} }

View File

@@ -595,7 +595,7 @@ class M704 extends BaseController
//memo 저장 //memo 저장
if (!empty($memo)) { if (!empty($memo)) {
$this->model->saveMemo(['vr_sq' => $atcl_vr_sq, 'memo' => $memo]); $this->model->saveMemo([$memo, $atcl_vr_sq]);
} }
//전화실패 사유 저장 //전화실패 사유 저장
if (!empty($tel_fail_cause)) { if (!empty($tel_fail_cause)) {

View File

@@ -58,7 +58,7 @@ class M705 extends BaseController
'srcDong' => $this->request->getGet('srcDong'), // 읍면동 'srcDong' => $this->request->getGet('srcDong'), // 읍면동
'bonbu' => $this->request->getGet('bonbu'), // 본부 'bonbu' => $this->request->getGet('bonbu'), // 본부
'team' => $this->request->getGet('team'), // 팀 'team' => $this->request->getGet('team'), // 팀
'damdang' => $this->request->guploadFileetGet('damdang'), // 담당 'damdang' => $this->request->getGet('damdang'), // 담당
'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1 'vrfcreq_way' => $this->request->getGet('vrfcreq_way'), // 검증방식1
'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2 'vrfc_type_sub' => $this->request->getGet('vrfc_type_sub'), // 검증방식2
'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사 'rcpt_cpid' => $this->request->getGet('rcpt_cpid'), // 매체사
@@ -486,7 +486,7 @@ class M705 extends BaseController
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '22', $reg_conf_yn_3, $reg_conf_yn_info_3); $this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '22', $reg_conf_yn_3, $reg_conf_yn_info_3);
//memo 저장 //memo 저장
$this->model->saveMemo(['vr_sq' => $atcl_vr_sq, 'memo' => $memo]); $this->model->saveMemo([$memo, $atcl_vr_sq]);
//실소유주 확인 저장 //실소유주 확인 저장
$this->model->update_owner_verifiable($atcl_vr_sq, $owner_verifiable); $this->model->update_owner_verifiable($atcl_vr_sq, $owner_verifiable);

View File

@@ -2,8 +2,12 @@
namespace App\Controllers\V2; namespace App\Controllers\V2;
use App\Controllers\BaseController; use App\Controllers\BaseController;
use App\Libraries\NaverApiClient;
use App\Models\common\CodeModel; use App\Models\common\CodeModel;
use App\Models\results\M415Model;
use App\Models\v2\M706Model; use App\Models\v2\M706Model;
use App\Models\v2\M710Model;
use Exception;
class M706 extends BaseController class M706 extends BaseController
{ {
@@ -110,6 +114,7 @@ class M706 extends BaseController
// 상세화면 // 상세화면
public function detail($id) public function detail($id)
{ {
$naver = new NaverApiClient();
$id = (string) $id; $id = (string) $id;
if ($id === '') { if ($id === '') {
@@ -124,6 +129,15 @@ class M706 extends BaseController
$memo = $this->model->getMemo($id); $memo = $this->model->getMemo($id);
$history = $this->model->getHistory($id); $history = $this->model->getHistory($id);
$complexList = [];
$ptpList = [];
// 아파트단지목록
$complexList = $naver->complexList($data['address_code']);
// 평형목록
$ptpList = $naver->ptpList($data['hscp_no']);
$this->data['codes'] = $codes; $this->data['codes'] = $codes;
$this->data['regist'] = $regist; $this->data['regist'] = $regist;
$this->data['record'] = $record; $this->data['record'] = $record;
@@ -132,8 +146,477 @@ class M706 extends BaseController
$this->data['memo'] = $memo; $this->data['memo'] = $memo;
$this->data['history'] = $history; $this->data['history'] = $history;
$this->data['complexList'] = $complexList;
$this->data['ptpList'] = $ptpList;
return view("pages/v2/m706/detail", $this->data); return view("pages/v2/m706/detail", $this->data);
}
// 매물정보 수정
public function modifyInfo()
{
$naver = new NaverApiClient();
try {
$atcl_vr_sq = $this->request->getPost('rcpt_key'); //순번
$atcl_hscp_nm = $this->request->getPost('atcl_hscp_nm'); //단지명
$atcl_ptp_nm = $this->request->getPost('atcl_ptp_nm'); //평형명
$atcl_vrfc_type = $this->request->getPost('atcl_vrtc_way'); //검증구분
$trade_type = $this->request->getPost('trade_type_cd'); //거래구분
$atcl_addr1 = $this->request->getPost('atcl_addr1'); //상세주소1 폐기예정
$atcl_addr1a = $this->request->getPost('atcl_addr1a'); // 리 주소
$atcl_addr1b = $this->request->getPost('atcl_addr1b'); // 공동 : 동 주소, 비공동 : 지번주소
$atcl_addr2 = $this->request->getPost('atcl_addr2'); //상세주소2
$atcl_hscp_no = $this->request->getPost('atcl_hscp_no'); //단지번호
$atcl_ptp_no = $this->request->getPost('atcl_ptp_no'); //단지명
$atcl_amt1 = $this->request->getPost('atcl_amt1');
$atcl_amt2 = $this->request->getPost('atcl_amt2');
$atcl_amt3 = $this->request->getPost('atcl_amt3');
$atcl_floor = $this->request->getPost('atcl_floor');
$atcl_floor2 = $this->request->getPost('atcl_floor2'); // 총층
$return = '';
if ($trade_type == 'A1') {
$return = limitHscpMarketPriceInfo($this, $trade_type, $atcl_hscp_no, $atcl_ptp_no, $atcl_amt1);
} elseif ($trade_type == 'B1') {
$return = limitHscpMarketPriceInfo($this, $trade_type, $atcl_hscp_no, $atcl_ptp_no, $atcl_amt2);
}
if (empty($return)) {
$result = $this->model->saveModifyInfo($atcl_vr_sq, $atcl_hscp_nm, $atcl_ptp_nm, $atcl_vrfc_type, $trade_type, $atcl_addr1, $atcl_addr1a, $atcl_addr1b, $atcl_addr2, $atcl_hscp_no, $atcl_ptp_no, $atcl_amt1, $atcl_amt2, $atcl_amt3, $atcl_floor, $atcl_floor2);
$this->model->saveModifyVrfc($atcl_vr_sq, $atcl_vrfc_type);
if ($result['error_number'] != 0) {
throw new \Exception($result['error_message']);
} else {
//API 호출
$resultData = $this->model->getDetail($atcl_vr_sq);
$modifyInfo = $naver->modifyInfo(
$resultData['data']['atcl_no'],
$resultData['data']['hscp_no'],
$resultData['data']['ptp_no'],
$resultData['data']['bild_nm'],
$resultData['data']['rm_no'],
$resultData['data']['trade_type_cd'],
$resultData['data']['deal_amt'],
$resultData['data']['wrrnt_amt'],
$resultData['data']['lease_amt'],
$resultData['data']['isale_amt'],
$resultData['data']['prem_amt'],
$resultData['data']['floor'],
$resultData['data']['floor2'],
$resultData['data']['charger'],
$resultData['data']['address_code'],
$resultData['data']['address2'],
$resultData['data']['address2a'],
$resultData['data']['address2b'],
$resultData['data']['address3'],
$resultData['data']['sply_spc'],
$resultData['data']['excls_spc'],
$resultData['data']['tot_spc'],
$resultData['data']['grnd_spc'],
$resultData['data']['bldg_spc']
);
if ($modifyInfo['result'] != 'success') { //결과값 확인
$return = $modifyInfo['error'];
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
$err_time = date("Y-m-d H:i:s");
$this->model->saveApiErr($atcl_vr_sq, $modifyInfo['error']['code'], $modifyInfo['error']['message'], $err_time, $resultData['data']['atcl_no']);
} }
}
return $this->response->setJSON(body: [
'code' => '0',
'msg' => '정상적으로 저장되었습니다.',
]);
}
} catch (\Exception $e) {
return $this->response->setJSON(body: [
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 서류확인정보 저장
public function saveDocu()
{
/*
1.0.1 POST 데이터 받기.
1.1.1 1차 검증인지 2차검증인지 확인.
1.1.2 1차, 2차 검증이면 v2_confirm.type에 넣을 값을 알맞게 셋팅.
1.2.1 v2_confirms에 데이터가 있는지 확인.
1.3.1 데이터가 있음 : success 여부 판단 후 updateConfirm 실행 success값만 UPDATE. (수정변경이력 저장)
1.4.1 데이터가 없음 : success 여부 판단 후 insertConfirm 실행 v2_confirms INSERT. (수정변경이력 저장)
1.4.2 상태변경 하기 : 전화(서류)확인중 상태로 변경. (수정변경이력 저장)
1.5.1 이미지파일 서버에 UPLOAD (수정변경이력 저장)
1.6.1 기존파일 탐색.
1.7.1 기존파일 있음 : 기존파일 use_yn 'N'으로 UPDATE 후 v2_files INSERT.
1.8.1 기존파일 없음 : v2_files INSERT.
1.9.1 확인여부 + 홍보확인서 미확인여부 상세, 매물주소, 가격거래구분, 의뢰인 정보 v2_check_list INSERT. (수정변경이력 저장)
1.10.1 API 전송.
1.11.1 API 전송결과 : SUCCESS 이면 상태값 변경 : 전화(서류)확인완료 상태. (수정변경이력 저장)
*/
$naver = new NaverApiClient();
$model710 = new M710Model();
$model415 = new M415Model();
$v2DailyModel = new V2StDailyModel();
try {
$usr_id = session('usr_id');
$toDay = date('Y-m-d H:i:s'); //오늘날짜
$atcl_vrtc_way = $this->request->getPost('atcl_vrtc_way');
$atcl_vr_sq = $this->request->getPost('rcpt_key');
$arr = $this->request->getPost('chTotal');
$fax_conf_res_d11 = $this->request->getPost('fax_conf_res_d11');
$fax_conf_yn_1 = $this->request->getPost('fax_conf_yn_1');
$fax_conf_yn_2 = $this->request->getPost('fax_conf_yn_2');
$fax_conf_yn_3 = $this->request->getPost('fax_conf_yn_3');
$fax_conf_yn_4 = $this->request->getPost('fax_conf_yn_4');
$fax_conf_yn_info_2 = $this->request->getPost('fax_conf_yn_info_2');
$fax_conf_yn_info_3 = $this->request->getPost('fax_conf_yn_info_3');
$fax_conf_yn_info_4 = $this->request->getPost('fax_conf_yn_info_4');
$reg_chk_val = $this->request->getPost('reg_chk_val');
$memo = $this->request->getPost('memo_fax');
$try_cnt = '0';
//상태가 이미 등기부등본확인중 이상이면 저장하지 않는다.
$resStat = $this->model->chkStat($atcl_vr_sq);
$v2_vrfc_req = $v2DailyModel->get_v2_vrfc_req($atcl_vr_sq);
if ((int) $resStat['stat_cd'] >= 40 || (int) $resStat['stat_cd'] == '190') {
throw new \Exception('이미 저장된 데이터입니다.');
} else {
$this->model->InsCharger($atcl_vr_sq); //담당자가 없을 경우 강제로 session 정보로 넣어준다
$resultCnt = $this->model->chkTryCnt($atcl_vr_sq); //1차검증인지 2차검증인지 확인 쿼리 : v2_vrfc_req.type_cnt
if ($resultCnt['try_cnt'] == 0) { //1차 검증일 때
$try_cnt = '1';
} else if ($resultCnt['try_cnt'] == 1) { //2차 검증일 때
$try_cnt = '2';
} else {
$try_cnt = intval($try_cnt) + 1;
}
$result = $this->model->chkConfirm($atcl_vr_sq, '');
if ($result == 0) { //v2_confirm 존재하지 않는다면
if ($fax_conf_yn_2 == '10000' && $fax_conf_yn_3 == '10000' && $fax_conf_yn_4 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$this->model->insertConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type, $try_cnt);
} else {
if ($fax_conf_yn_2 == '10000' && $fax_conf_yn_3 == '10000' && $fax_conf_yn_4 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$resUpdate = $this->model->updateConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type);
}
//상태변경 TABLE INSERT : 전화(서류)확인중 상태로 변경
$result_query2 = $this->model->chgStat($atcl_vr_sq, '30', $toDay);
$chgVrfc = $this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
//v2_check_list 확인여부 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D11', $fax_conf_res_d11, $arr);
//v2_check_list 매물주소 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D12', $fax_conf_yn_2, $fax_conf_yn_info_2);
//v2_check_list 가격거래구분 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D13', $fax_conf_yn_3, $fax_conf_yn_info_3);
//v2_check_list 의뢰인정보 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, 'D14', $fax_conf_yn_4, $fax_conf_yn_info_4);
//memo 저장
if (!empty($memo)) {
$this->model->saveMemo([$memo, $usr_id, $atcl_vr_sq]);
}
//API 호출
$sendData = $this->model->getDataConfirmAPI($atcl_vr_sq);
if ($fax_conf_yn_4 == '10000' || (int) $try_cnt < 2) {
$send_result = $naver->confirm($sendData['atclNo'], $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['modifyInfo'], $sendData['date']);
if ($send_result['result'] == 'success') { //HISTORY
if ($fax_conf_res_d11 == '10000' && $chk_type == '1') {
//상태변경 TABLE INSERT : 전화(서류)확인 완료 상태로 변경
$this->model->chgStat($atcl_vr_sq, '35', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '35'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '35'); //fax_imgs
if ($reg_chk_val == '1') {
//등기부등본 확인 대상은 전화(서류)확인 완료 후 -> 등기부등본 확인중 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '40', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '40'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '40'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0201', '1', 'add'); // 일치로 저장
} else {
//등기부등본 확인 대상이 아닌 경우 전화(서류)확인 완료 후 -> 검증 완료 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '60', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '60'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '60'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0205', '1', 'add'); // 홍보확인서완료 등기부등본확인 안함 저장
}
} else {
//상태변경 TABLE INSERT : 전화(서류)확인 불일치
$this->model->chgStat($atcl_vr_sq, '39', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '39'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '39'); //fax_imgs
if ($try_cnt == '1') {
//v2_vrfc_req try_cnt 값을 1로 update
$this->model->chgTryCnt($atcl_vr_sq, '1');
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0301', '1', 'add'); // 1차실패로 저장
} else if ($try_cnt == '2') {
//v2_vrfc_req try_cnt 값을 2로 update
$this->model->chgTryCnt($atcl_vr_sq, '2');
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '69', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0302', '1', 'add'); // 2차실패로 저장
}
if ($fax_conf_res_d11 == '20013') {
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0203', '1', 'add'); // 기타로 저장
} else {
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'D0202', '1', 'add'); // 불일치로 저장
}
}
} else {
if (isset($send_result['error'])) {
$error_message = $send_result['error']['code'] . "\\n" . $send_result['error']['message'];
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
$err_time = date("Y-m-d H:i:s");
$this->model->saveApiErr($atcl_vr_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
throw new \Exception($error_message);
} else {
throw new \Exception('네이버 전송 중 오류가 발생되었습니다. 다시 시도하세요.');
}
}
} else {
$this->model->chgStat($atcl_vr_sq, '39', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '39'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '39'); //fax_imgs
$this->model->saveChangedHistory($atcl_vr_sq, '30', 'C9', $usr_id, '상태변경 : 39 => 30'); //검증결과 변동사항 HISTORY
$this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '30'); //fax_imgs
throw new Exception('의뢰인정보 불일치로 저장되었습니다.');
}
return $this->response->setJSON(body: [
'code' => '0',
'msg' => '정상적으로 저장되었습니다.',
]);
}
} catch (\Exception $e) {
return $this->response->setJSON(body: [
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
// 등기부등본 정보 저장
public function saveRegi()
{
/*
1.0.1 POST 데이터 받기.
1.1.1 1차 검증인지 2차검증인지 확인.
1.1.2 1차, 2차 검증이면 v2_confirm.type에 넣을 값을 알맞게 셋팅.
1.2.1 v2_confirms에 데이터가 있는지 확인.
1.3.1 데이터가 있음 : success 여부 판단 후 updateConfirm 실행 success값만 UPDATE. (수정변경이력 저장)
1.4.1 데이터가 없음 : success 여부 판단 후 insertConfirm 실행 v2_confirms INSERT. (수정변경이력 저장)
1.4.2 상태변경 하기 : 등기부등본 확인중 상태로 변경. (수정변경이력 저장)
1.5.1 이미지파일 서버에 UPLOAD (수정변경이력 저장)
1.6.1 기존파일 탐색.
1.7.1 기존파일 있음 : 기존파일 use_yn 'N'으로 UPDATE 후 v2_files INSERT.
1.8.1 기존파일 없음 : v2_files INSERT.
1.9.1 매물주소, 의뢰인 정보 v2_check_list INSERT. (수정변경이력 저장)
1.10.1 API 전송.
1.11.1 API 전송결과 : SUCCESS 이면 상태값 변경 : 등기부등본 확인완료 상태. (수정변경이력 저장)
*/
$naver = new NaverApiClient();
$model710 = new M710Model();
$model415 = new M415Model();
$v2DailyModel = new V2StDailyModel();
try {
$mode = $this->request->getGet('mode');
$usr_id = session('usr_id');
$toDay = date('Y-m-d H:i:s');
$atcl_vrtc_way = 'R';
$atcl_vr_sq = $this->request->getPost('rcpt_key');
$reg_conf_yn_1 = $this->request->getPost('reg_conf_yn_1');
$reg_conf_yn_2 = $this->request->getPost('reg_conf_yn_2');
$reg_conf_yn_3 = $this->request->getPost('reg_conf_yn_3');
$reg_conf_yn_info_2 = $this->request->getPost('reg_conf_yn_info_2');
$reg_conf_yn_info_3 = $this->request->getPost('reg_conf_yn_info_3');
$memo = $this->request->getPost('memo_reg');
$try_cnt = '0';
//상태가 이미 등기부등본확인중 이상이면 저장하지 않는다.
$resStat = $this->model->chkStat($atcl_vr_sq);
$v2_vrfc_req = $this->model->get_v2_vrfc_req($atcl_vr_sq);
if ((int) $resStat['stat_cd'] >= 60 || (int) $resStat['stat_cd'] == 19) {
throw new \Exception('이미 저장된 데이터입니다.');
} else {
$this->model->InsResChar($atcl_vr_sq); //담당자가 없을 경우 강제로 session 정보로 넣어준다
$resultCnt = $this->model->chkRegiTryCnt($atcl_vr_sq); //1차검증인지 2차검증인지 확인 쿼리 : v2_vrfc_req.type_cnt
if ($resultCnt['reg_try_cnt'] == 0) { //1차 검증일 때
$try_cnt = '1';
} else if ($resultCnt['reg_try_cnt'] == 1) { //2차 검증일 때
$try_cnt = '2';
} else {
$try_cnt = intval($try_cnt) + 1;
}
$result = $this->model->chkConfirm($atcl_vr_sq, $atcl_vrtc_way);
if ($result == 0) {
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$this->model->insertConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type, $try_cnt);
} else {
if ($reg_conf_yn_2 == '10000' && $reg_conf_yn_3 == '10000') { //success 여부 판단
$chk_type = '1';
//$chk_delay = '0'; //지연여부
//$chk_zombie = '0'; //좀비매물
} else {
$chk_type = '0';
//$chk_delay = '1'; //지연여부
//$chk_zombie = '0'; //좀비매물
}
$this->model->updateConfirm($atcl_vr_sq, $atcl_vrtc_way, $chk_type);
}
//상태변경 TABLE INSERT : 등기부등본 확인중 상태로 변경
$this->model->chgStat($atcl_vr_sq, '40', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '40'); //v2_vrfc_req INSERT
//v2_check_list 확인여부 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '21', $reg_conf_yn_2, $reg_conf_yn_info_2);
//v2_check_list 매물주소 INSERT
$this->model->insertChkList($atcl_vr_sq, $atcl_vrtc_way, '22', $reg_conf_yn_3, $reg_conf_yn_info_3);
//memo 저장
if (!empty($memo)) {
$this->model->updateMemo([$memo, $atcl_vr_sq]);
}
//API 호출
$sendData = $this->model->getDatacertAPI($atcl_vr_sq, 'R');
$send_result = $naver->certification($sendData['atclNo'], $try_cnt, $sendData['success'], $sendData['checkList'], $sendData['charger'], $sendData['date'], $sendData['modifyInfo'], $sendData['ownerVerifiable']);
if ($send_result['result'] == 'success') {
if ($chk_type == '1') {
//상태변경 TABLE INSERT : 등기부등본 확인완료 상태로 변경
$this->model->chgStat($atcl_vr_sq, '45', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '45'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '45'); //fax_imgs
//상태변경 TABLE INSERT : 검증완료 상태로 변경
$this->model->chgStat($atcl_vr_sq, '60', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '60'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '60'); //fax_imgs
$v2_vrfc_req->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0101', '1', 'add'); // 일치로 저장
} else {
//상태변경 TABLE INSERT : 등기부등본 확인 불일치 상태로 변경
$this->model->chgStat($atcl_vr_sq, '49', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '49'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '49'); //fax_imgs
//등기부등본 확인중 상태로 변경.
$this->model->saveChangedHistory($atcl_vr_sq, '30', 'C9', $usr_id, '상태변경 : 49 => 30'); //검증결과 변동사항 HISTORY
$this->model->chgStatVrfc($atcl_vr_sq, '30'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '30'); //fax_imgs
if ($try_cnt == '1') {
//v2_vrfc_req try_cnt 값을 1로 update
$this->model->chgRegiTryCnt($atcl_vr_sq, '1');
} else if ($try_cnt == '2') {
//v2_vrfc_req try_cnt 값을 2로 update
$this->model->chgRegiTryCnt($atcl_vr_sq, '2');
//상태변경 TABLE INSERT : 검증실패 상태로 변경.
$this->model->chgStat($atcl_vr_sq, '69', $toDay);
$this->model->chgStatVrfc($atcl_vr_sq, '69'); //v2_vrfc_req INSERT
$this->model->chgStatFax($atcl_vr_sq, '69'); //fax_imgs
}
$v2DailyModel->set_v2_st_daily(NULL, $v2_vrfc_req['cpid'], 'R0102', '1', 'add'); // 불일치로 저장
}
} else {
if (isset($send_result['error'])) {
$error_message = $send_result['error']['code'] . "\\n" . $send_result['error']['message'];
// API 호출 에러 발생시 해당 내용들을 DB에 저장해준다.
$err_time = date("Y-m-d H:i:s");
$this->model->saveApiErr($atcl_vr_sq, $send_result['error']['code'], $send_result['error']['message'], $err_time, $v2_vrfc_req['atcl_no']);
throw new \Exception($error_message);
} else {
throw new \Exception('네이버 전송 중 오류가 발생되었습니다. 다시 시도하세요.');
}
}
return $this->response->setJSON(body: [
'code' => '0',
'msg' => '정상적으로 저장되었습니다.',
]);
}
} catch (\Exception $e) {
return $this->response->setJSON(body: [
'code' => '9',
'msg' => $e->getMessage(),
]);
}
}
} }

View File

@@ -1507,6 +1507,20 @@ class M702Model extends Model
]; ];
} }
public function chgTryCnt($vr_sq, $try_cnt)
{ //v2_vrfc_req try_cnt 값 변경.
$sql = "UPDATE v2_vrfc_req" .
" SET try_cnt = ?" .
" WHERE vr_sq = ?";
$data = array(
$try_cnt,
$vr_sq
);
$this->db->query($sql, $data);
}
// 변경이력 조회 // 변경이력 조회
public function getHistory($vr_sq) public function getHistory($vr_sq)
{ {

View File

@@ -1,6 +1,7 @@
<?php <?php
namespace App\Models\v2; namespace App\Models\v2;
use App\Models\webfax\FaxModel;
use CodeIgniter\Model; use CodeIgniter\Model;
class M704Model extends Model class M704Model extends Model
@@ -867,7 +868,7 @@ class M704Model extends Model
$this->db->transComplete(); $this->db->transComplete();
// 홍보확인서인 경우 주소 변경시 FAX 이미지의 정보도 함께 변경한다. // 홍보확인서인 경우 주소 변경시 FAX 이미지의 정보도 함께 변경한다.
$faxModel = model('App\Models\FaxModel'); $faxModel = new FaxModel();
$faxModel->updateAddress($atcl_vr_sq, $list['address_code'], $data['address2'] ?? '', $data['address3'] ?? '', $data['hscp_no'] ?? '', $data['hscp_nm'] ?? ''); $faxModel->updateAddress($atcl_vr_sq, $list['address_code'], $data['address2'] ?? '', $data['address3'] ?? '', $data['hscp_no'] ?? '', $data['hscp_nm'] ?? '');
return $return; return $return;

View File

@@ -1,6 +1,7 @@
<?php <?php
namespace App\Models\v2; namespace App\Models\v2;
use App\Models\webfax\FaxModel;
use CodeIgniter\Model; use CodeIgniter\Model;
class M706Model extends Model class M706Model extends Model
@@ -757,6 +758,679 @@ class M706Model extends Model
return $query->getRowArray(); return $query->getRowArray();
} }
/* 매물정보를 수정 */
public function saveModifyInfo($atcl_vr_sq, $atcl_hscp_nm, $atcl_ptp_nm, $atcl_vrfc_type, $trade_type, $atcl_addr1, $atcl_addr1a, $atcl_addr1b, $atcl_addr2, $atcl_hscp_no, $atcl_ptp_no, $atcl_amt1, $atcl_amt2, $atcl_amt3, $atcl_floor, $atcl_floor2)
{
$session = session();
$usr_id = $session->get('usr_id');
$list = $this->getDetail($atcl_vr_sq);
$data = [];
if ($trade_type != 'B2') {
$atcl_amt3 = '0';
$data['lease_amt'] = $atcl_amt3;
}
if (!empty($trade_type))
$data['trade_type'] = $trade_type;
if (!empty($atcl_hscp_nm))
$data['hscp_nm'] = $atcl_hscp_nm;
if (!empty($atcl_ptp_nm))
$data['ptp_nm'] = $atcl_ptp_nm;
if (!empty($atcl_addr1))
$data['address2'] = $atcl_addr1;
if (!empty($atcl_addr1a))
$data['address2a'] = $atcl_addr1a;
if (!empty($atcl_addr1b))
$data['address2b'] = $atcl_addr1b;
if (!empty($atcl_addr2))
$data['address3'] = $atcl_addr2;
if (!empty($atcl_hscp_no))
$data['hscp_no'] = $atcl_hscp_no;
if (!empty($atcl_ptp_no))
$data['ptp_no'] = $atcl_ptp_no;
if (!empty($atcl_amt1))
$data['deal_amt'] = $atcl_amt1;
if (!empty($atcl_amt2))
$data['wrrnt_amt'] = $atcl_amt2;
if (!empty($atcl_amt3))
$data['lease_amt'] = $atcl_amt3;
if (!empty($atcl_floor))
$data['floor'] = $atcl_floor;
if (!empty($atcl_floor2))
$data['floor2'] = $atcl_floor2;
$data['modify_yn'] = 'Y';
$this->db->transStart();
$builder = $this->db->table('v2_modify_info');
$builder->where('vr_sq', $atcl_vr_sq);
$builder->update($data);
$last_query = $this->db->getLastQuery();
$current_url = current_url();
log_message('debug', $current_url . ' :: ' . $last_query);
$data['trade_type_cd'] = $trade_type;
$return['error_number'] = $this->db->error()['code'];
$return['error_message'] = $this->db->error()['message'];
if (empty($return['error_number'])) {
if ($this->db->affectedRows() > 0) {
if (!empty($changed)) {
$this->saveChangedHistory($list['vr_sq'], $list['pre_stat_cd'], 'C25', $usr_id, "매물정보 수정");
}
}
}
$this->db->transComplete();
// 홍보확인서인 경우 주소 변경시 FAX 이미지의 정보도 함께 변경한다.
$faxModel = new FaxModel();
$faxModel->updateAddress($atcl_vr_sq, $list['address_code'], $data['address2'] ?? '', $data['address3'] ?? '', $data['hscp_no'] ?? '', $data['hscp_nm'] ?? '');
return $return;
}
public function saveModifyVrfc($atcl_vr_sq, $atcl_vrfc_type)
{
$usr_id = session('usr_id');
$list = $this->getDetail($atcl_vr_sq); //변경된 내용 비교를 위해.
$data['vrfc_type'] = $atcl_vrfc_type;
$this->db->where('vr_sq', $atcl_vr_sq);
$this->db->trans_start();
$this->db->update('v2_vrfc_req', $data);
$data['vrfc_type_cd'] = $atcl_vrfc_type;
//echo $this->db->last_query();
$return['error_number'] = $this->db->_error_number();
$return['error_message'] = $this->db->_error_message();
if (empty($return['error_number'])) {
// 로그를 남긴다.
if ($this->db->affected_rows() > 0) {
if (!empty($changed)) {
$this->saveChangedHistory($list['data']['vr_sq'], $list['data']['pre_stat_cd'], 'C25', $usr_id, "매물정보 저장");
}
}
}
$this->db->trans_complete();
return $return;
}
/* 현재 상태 확인 */
public function chkStat($vr_sq)
{
$sql = "SELECT stat_cd FROM v2_vrfc_req WHERE vr_sq = ?";
$data = array(
$vr_sq
);
$query = $this->db->query($sql, $data);
return $query->getRowArray();
}
public function InsCharger($atcl_vr_sq)
{
$usr_id = session('usr_id');
$sql = "UPDATE v2_article_info" .
" SET charger = ?" .
" WHERE vr_sq = ?";
$data = array(
$usr_id,
$atcl_vr_sq
);
$res = $this->db->query($sql, $data);
$log_v = $this->db->getLastQuery();
log_message('debug', $log_v);
}
public function chkTryCnt($atcl_vr_sq)
{
// 1차 검증인지 2차 검증인지 확인.
$builder = $this->db->table('v2_vrfc_req');
$builder->select('try_cnt');
$builder->where('vr_sq', $atcl_vr_sq);
$query = $builder->get();
return $query->getRowArray();
}
public function chkConfirm($atcl_vr_sq, $reg_yn = null)
{
// 검증결과 table에 있는지 확인.
$builder = $this->db->table('v2_confirm');
$builder->select('vr_sq');
$builder->where('vr_sq', $atcl_vr_sq);
if ($reg_yn) {
$builder->where('vrfc_type', $reg_yn); // 등기부등본 정보 확인시
}
$query = $builder->get();
return $query->getNumRows();
}
public function insertConfirm($vr_sq, $vrfc_type, $success, $type)
{ //v2_confirm INSERT
$usr_sq = session('usr_sq');
$usr_id = session('usr_id');
$sql = "INSERT INTO v2_confirm" .
"(vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm)" .
"VALUES" .
"(?, ?, ?, ?, ?, '" . date('YmdHis') . "', ?, NOW(), ?, NOW())";
$data = array(
$vr_sq,
$vrfc_type,
$success,
$type,
$usr_id,
$usr_sq,
$usr_sq
);
$this->db->query($sql, $data);
}
public function updateConfirm($vr_sq, $vrfc_type, $success)
{
$data = [
'success' => $success,
'update_tm' => date('Y-m-d H:i:s')
];
$builder = $this->db->table('v2_confirm');
$builder->where('vr_sq', $vr_sq);
$builder->where('vrfc_type', $vrfc_type);
$builder->update($data);
$return = [
'error_number' => $this->db->error()['code'],
'error_message' => $this->db->error()['message']
];
return $return;
}
public function chgStat($vr_sq, $stat_cd, $insert_tm)
{
// 상태변경 TABLE INSERT
$usr_sq = session('usr_sq');
$usr_id = session('usr_id');
$list = $this->getDetail($vr_sq);
$sql = "INSERT INTO v2_chg_stat (vr_sq, stat_cd, insert_user, insert_tm) " .
"VALUES (?, ?, ?, ?) " .
"ON DUPLICATE KEY UPDATE " .
"vr_sq=VALUES(vr_sq), stat_cd=VALUES(stat_cd), insert_user=VALUES(insert_user), insert_tm=VALUES(insert_tm)";
$data = [
$vr_sq,
$stat_cd,
$usr_sq,
$insert_tm
];
$this->db->transStart();
$query = $this->db->query($sql, $data);
$last_query = $this->db->getLastQuery();
log_message('debug', $last_query);
$return['error_number'] = $this->db->error()['code'];
$return['error_message'] = $this->db->error()['message'];
if (empty($return['error_number'])) {
// 로그를 남긴다.
if ($this->db->affectedRows() > 0) {
$changed = $this->whatIsChanged($list, $data, '');
if (!empty($changed)) {
$this->saveChangedHistory($list['vr_sq'], $stat_cd, 'C9', $usr_id, $changed);
}
}
}
$this->db->transComplete();
return $return;
}
public function chgStatVrfc($vr_sq, $stat_cd)
{
$data = ['stat_cd' => $stat_cd];
$builder = $this->db->table('v2_vrfc_req');
$builder->where('vr_sq', $vr_sq);
$builder->update($data);
$last_query = $this->db->getLastQuery();
log_message('debug', $last_query);
$return['error_number'] = $this->db->error()['code'];
$return['error_message'] = $this->db->error()['message'];
return $return;
}
public function chgStatFax($vr_sq, $stat_cd)
{
$data = ['stat_cd' => $stat_cd];
$builder = $this->db->table('fax_imgs');
$builder->where('vr_sq', $vr_sq);
$builder->update($data);
$last_query = $this->db->getLastQuery();
log_message('debug', $last_query);
$return['error_number'] = $this->db->error()['code'];
$return['error_message'] = $this->db->error()['message'];
return $return;
}
public function chgTryCnt($vr_sq, $try_cnt)
{ //v2_vrfc_req try_cnt 값 변경.
$sql = "UPDATE v2_vrfc_req" .
" SET try_cnt = ?" .
" WHERE vr_sq = ?";
$data = array(
$try_cnt,
$vr_sq
);
$this->db->query($sql, $data);
}
public function insertChkList($vr_sq, $vrfc_type, $type, $code, $comment)
{ //v2_check_list INSERT
$usr_sq = $this->session->userdata('usr_sq');
$sql = "INSERT INTO v2_check_list" .
"(vr_sq, vrfc_type, type, code, comment, insert_user, insert_tm)" .
"VALUES" .
"(?, ?, ?, ?, ?, ?, NOW())" .
" ON DUPLICATE KEY UPDATE" .
" vr_sq=values(vr_sq), vrfc_type=values(vrfc_type), type=values(type), code=values(code), comment=values(comment), insert_user=values(insert_user), insert_tm=values(insert_tm)";
$data = array(
$vr_sq,
$vrfc_type,
$type,
$code,
$comment,
$usr_sq
);
$this->db->query($sql, $data);
}
/**
* 검증결과 전송 API를 위한 데이터 조회..
*/
public function getDataConfirmAPI($vr_sq)
{
// 요청정보
$sql = "SELECT vr_sq, atcl_no, step, cpid, cp_atcl_id, trade_type, realtor_nm, realtor_tel_no, seller_tel_no, vrfc_type, rgbk_confirm, req_type, rdate, stat_cd, try_cnt, insert_user, insert_tm" .
" FROM v2_vrfc_req WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$row_vrfc_req = $query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 매물정보
$sql = "SELECT vr_sq, atcl_no, cpid, cp_atcl_id, rlet_type_cd, trade_type, address_code, address1, address2, address3, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sise, floor, rdate, seller_tel_no, seller_nm, realtor_nm, realtor_tel_no, hscp_no, hscp_nm, ptp_no, ptp_nm, charger, req_price_yn, reg_charger, dept1_sq, dept2_sq, reg_dept1_sq, reg_dept2_sq, floor2" .
" FROM v2_article_info WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 수정정보
$sql = "SELECT vr_sq, bild_nm, rm_no, floor, address_code, address2, address3, address4, trade_type, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, hscp_no, hscp_nm, ptp_no, ptp_nm, modify_yn, floor2 FROM v2_modify_info WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$row_modify_info = $query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 검증결과
$sql = "SELECT vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type" .
" FROM v2_confirm WHERE vr_sq = ? AND vrfc_type = ?";
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
$row_confirm = $query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 확인정보
$sql = "SELECT type, code, comment, ownerNm, ownerBirth FROM v2_check_list WHERE vr_sq = ? AND vrfc_type = ? AND type LIKE CONCAT(vrfc_type, '%')";
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
$res_check_list = $query->getResultArray();
log_message('debug', $this->db->getLastQuery());
log_message('debug', implode(', ', $row_confirm));
$atclNo = $row_vrfc_req['atcl_no'];
$success = empty($row_confirm['success']) ? false : true;
$charger = $row_confirm['charger'];
$date = $row_confirm['date'];
$try_cnt = $row_vrfc_req['try_cnt'];
$checkList = [];
foreach ($res_check_list as $row) {
$checkList[] = [
'type' => $row['type'],
'code' => $row['code'],
'comment' => $row['comment'],
'ownerNm' => $row['ownerNm'],
'ownerBirth' => $row['ownerBirth'],
];
}
$modifyInfo = [];
if ($row_modify_info['modify_yn'] === 'Y') {
if (!empty($row_modify_info['hscp_no'])) {
// 공동주택
$modifyInfo = [
'hscpNo' => $row_modify_info['hscp_no'],
'ptpNo' => $row_modify_info['ptp_no'],
'bildNm' => $row_modify_info['address2'],
'rmNo' => $row_modify_info['address3'],
'tradeType' => $row_modify_info['trade_type'],
'dealAmt' => $row_modify_info['deal_amt'],
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
'leaseAmt' => $row_modify_info['lease_amt'],
'isaleAmt' => $row_modify_info['isale_amt'],
'premAmt' => $row_modify_info['prem_amt'],
'floor' => $row_modify_info['floor'],
];
} else {
// 비공동주택
$modifyInfo = [
'addressCode' => $row_modify_info['address_code'],
'address2' => $row_modify_info['address2'],
'address3' => $row_modify_info['address3'],
'tradeType' => $row_modify_info['trade_type'],
'dealAmt' => $row_modify_info['deal_amt'],
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
'leaseAmt' => $row_modify_info['lease_amt'],
'splySpc' => $row_modify_info['sply_spc'],
'exclsSpc' => $row_modify_info['excls_spc'],
'totSpc' => $row_modify_info['tot_spc'],
'grndSpc' => $row_modify_info['grnd_spc'],
'bldgSpc' => $row_modify_info['bldg_spc'],
'floor' => $row_modify_info['floor'],
'floor2' => $row_modify_info['floor2'],
];
}
return [
'atclNo' => $atclNo,
'success' => $success,
'checkList' => $checkList,
'charger' => $charger,
'modifyInfo' => $modifyInfo,
'date' => $date,
'try_cnt' => $try_cnt,
];
} else {
return [
'atclNo' => $atclNo,
'success' => $success,
'checkList' => $checkList,
'charger' => $charger,
'date' => $date,
'try_cnt' => $try_cnt,
];
}
}
public function InsResChar($atcl_vr_sq)
{
$usr_id = session('usr_id');
$sql = "UPDATE v2_article_info" .
" SET reg_charger = ?" .
" WHERE vr_sq = ?";
$data = array(
$usr_id,
$atcl_vr_sq
);
$res = $this->db->query($sql, $data);
$log_v = $this->db->getLastQuery();
log_message('debug', $log_v);
}
public function chkRegiTryCnt($atcl_vr_sq)
{
// 1차 검증인지 2차 검증인지 확인.
$builder = $this->db->table('v2_vrfc_req');
$builder->select('reg_try_cnt');
$builder->where('vr_sq', $atcl_vr_sq);
$query = $builder->get();
$last_query = $this->db->getLastQuery();
log_message('debug', $last_query);
return $query->getRowArray();
}
/* 등기부등본 API 호출*/
public function getDatacertAPI($vr_sq, $vrfc_type = '')
{
// 요청정보
$sql = "SELECT vr_sq, atcl_no, step, cpid, cp_atcl_id, trade_type, realtor_nm, realtor_tel_no, seller_tel_no, vrfc_type, rgbk_confirm, req_type, rdate, stat_cd, try_cnt, insert_user, insert_tm, owner_verifiable" .
" FROM v2_vrfc_req WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$row_vrfc_req = $query->getRowArray();
if (!empty($vrfc_type)) {
$row_vrfc_req['vrfc_type'] = $vrfc_type;
}
log_message('debug', $this->db->getLastQuery());
// 매물정보
$sql = "SELECT vr_sq, atcl_no, cpid, cp_atcl_id, rlet_type_cd, trade_type, address_code, address1, address2, address3, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sise, floor, rdate, seller_tel_no, seller_nm, realtor_nm, realtor_tel_no, hscp_no, hscp_nm, ptp_no, ptp_nm, charger, req_price_yn, reg_charger, dept1_sq, dept2_sq, reg_dept1_sq, reg_dept2_sq, floor2" .
" FROM v2_article_info WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 수정정보
$sql = "SELECT vr_sq, bild_nm, rm_no, floor, address_code, address2, address3, trade_type, deal_amt, wrrnt_amt, lease_amt, isale_amt, prem_amt, sply_spc, excls_spc, tot_spc, grnd_spc, bldg_spc, hscp_no, hscp_nm, ptp_no, ptp_nm, modify_yn, floor2" .
" FROM v2_modify_info WHERE vr_sq = ?";
$query = $this->db->query($sql, [$vr_sq]);
$row_modify_info = $query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 검증결과
$sql = "SELECT vr_sq, vrfc_type, success, type, charger, date, insert_user, insert_tm, update_user, update_tm, work_type" .
" FROM v2_confirm WHERE vr_sq = ? AND vrfc_type = ?";
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
$row_confirm = $query->getRowArray();
log_message('debug', $this->db->getLastQuery());
// 확인정보
$sql = "SELECT a.type, a.code, a.comment, b.ownerNm, b.owner_birth" .
" FROM v2_check_list a " .
" INNER JOIN v2_article_info b ON a.vr_sq = b.vr_sq" .
" WHERE a.vr_sq = ? AND a.vrfc_type = ?";
$query = $this->db->query($sql, [$vr_sq, $row_vrfc_req['vrfc_type']]);
$res_check_list = $query->getResultArray();
log_message('debug', $this->db->getLastQuery());
log_message('debug', implode(', ', $row_confirm));
$atclNo = $row_vrfc_req['atcl_no'];
$type = $row_vrfc_req['try_cnt'];
$success = empty($row_confirm['success']) ? false : true;
$charger = $row_confirm['charger'];
$date = $row_confirm['date'];
$ownerVerifiable = ($row_vrfc_req['owner_verifiable'] === 'false') ? false : true;
$checkList = [];
foreach ($res_check_list as $row) {
$checkList[] = [
'type' => $row['type'],
'code' => $row['code'],
'comment' => $row['comment'],
'ownerNm' => $row['ownerNm'],
'ownerBirth' => $row['owner_birth'],
];
}
$modifyInfo = [];
if ($row_modify_info['modify_yn'] === 'Y') {
if (!empty($row_modify_info['hscp_no'])) {
// 공동주택
$modifyInfo = [
'hscpNo' => $row_modify_info['hscp_no'],
'ptpNo' => $row_modify_info['ptp_no'],
'bildNm' => $row_modify_info['address2'],
'rmNo' => $row_modify_info['address3'],
'tradeType' => $row_modify_info['trade_type'],
'dealAmt' => $row_modify_info['deal_amt'],
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
'leaseAmt' => $row_modify_info['lease_amt'],
'isaleAmt' => $row_modify_info['isale_amt'],
'premAmt' => $row_modify_info['prem_amt'],
'floor' => $row_modify_info['floor'],
];
} else {
// 비공동주택
$modifyInfo = [
'addressCode' => $row_modify_info['address_code'],
'address2' => $row_modify_info['address2'],
'address3' => $row_modify_info['address3'],
'tradeType' => $row_modify_info['trade_type'],
'dealAmt' => $row_modify_info['deal_amt'],
'wrrntAmt' => $row_modify_info['wrrnt_amt'],
'leaseAmt' => $row_modify_info['lease_amt'],
'splySpc' => $row_modify_info['sply_spc'],
'exclsSpc' => $row_modify_info['excls_spc'],
'totSpc' => $row_modify_info['tot_spc'],
'grndSpc' => $row_modify_info['grnd_spc'],
'bldgSpc' => $row_modify_info['bldg_spc'],
'floor' => $row_modify_info['floor'],
'floor2' => $row_modify_info['floor2'],
];
}
return [
'atclNo' => $atclNo,
'type' => $type,
'success' => $success,
'checkList' => $checkList,
'charger' => $charger,
'modifyInfo' => $modifyInfo,
'date' => $date,
'ownerVerifiable' => $ownerVerifiable,
];
} else {
return [
'atclNo' => $atclNo,
'type' => $type,
'success' => $success,
'checkList' => $checkList,
'charger' => $charger,
'date' => $date,
'ownerVerifiable' => $ownerVerifiable,
];
}
}
// 메모저장
public function saveMemo($data)
{
$usr_id = session('usr_id');
$sql = "UPDATE v2_vrfc_req SET
memo = ?
WHERE vr_sq = ?";
if ($this->db->query($sql, $data) === false) {
return [
'success' => false,
'msg' => '파일정보 저장 실패',
];
}
$row = $this->getDetail($data[1]);
$memo = "메모변경 : " . $row['memo'] . " => " . $data[0];
$this->saveChangedHistory($data[1], $row['pre_stat_cd'], 'C19', $usr_id, $memo);
return [
'success' => true
];
}
public function saveApiErr($err_sq, $err_code, $err_nm, $err_time, $err_no, $err_server = '')
{
$sql = "INSERT INTO err_api (err_sq, err_code, err_nm, err_time, err_no, err_server)" .
" VALUES (?, ?, ?, ?, ?, ?);";
$data = array(
$err_sq,
$err_code,
$err_nm,
$err_time,
$err_no,
$err_server
);
$this->db->query($sql, $data);
}
// 정보변경 이력 저장
public function saveChangedHistory($vr_sq, $stat_cd, $chg_type, $usr_id, $memo)
{
$sql = "INSERT INTO v2_chg_history" .
" (vr_sq, stat_cd, chg_type, insert_id, insert_tm, memo)" .
" VALUES" .
" (?, ?, ?, ?, now(), ?)";
$data = [
$vr_sq,
$stat_cd,
$chg_type,
$usr_id,
$memo
];
$res = $this->db->query($sql, $data);
}
// 변경이력 조회 // 변경이력 조회
public function getHistory($id) public function getHistory($id)
{ {

View File

@@ -2309,7 +2309,7 @@ if (!empty($data['cert_register']) && $data['cert_register_save_yn'] != 'Y') { /
success: function (result) { success: function (result) {
if (result.code == '0') { if (result.code == '0') {
location.replace('/board/notice/lists') location.reload();
} else { } else {
Swal.fire({ Swal.fire({
title: result.msg, title: result.msg,

View File

@@ -1853,7 +1853,125 @@ if (!empty($data['cert_register']) && $data['cert_register_save_yn'] != 'Y') { /
// 서류확인정보 저장 // 서류확인정보 저장
function saveDocu() { function saveDocu() {
var frm = document.rcptFrm;
if (frm.fax_conf_res_d11.value == "") {
Swal.fire("확인여부를 선택해주세요");
frm.fax_conf_res_d11.focus();
return false;
}
var chValue = "";
var i = 1;
for (i = 1; i <= 14; i++) {
if ($('#ch' + i).is(':checked') == true) {
chValue = chValue + "|Y";
} else {
chValue = chValue + "|N";
}
}
//alert(chValue);
chValue = chValue.substr(1);
$('#chTotal').val(chValue);
if (frm.fax_conf_yn_2.value == "") {
Swal.fire("매물주소 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_2.focus();
return false;
}
if (frm.fax_conf_yn_3.value == "") {
Swal.fire("가격 거래구분 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_3.focus();
return false;
}
if (frm.fax_conf_yn_4.value == "") {
Swal.fire("의뢰인 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_4.focus();
return false;
}
if (frm.fax_conf_yn_2.value == "20000") {
if (frm.fax_conf_yn_info_2.value == "") {
Swal.fire("매물주소 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_2.focus();
return false;
}
}
if (frm.fax_conf_yn_3.value == "20000") {
if (frm.fax_conf_yn_info_3.value == "") {
Swal.fire("가격 거래구분 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_3.focus();
return false;
}
}
if (frm.fax_conf_yn_4.value == "20000") {
if (frm.fax_conf_yn_info_4.value == "") {
Swal.fire("의뢰인정보 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_4.focus();
return false;
}
}
swal.fire({
text: "저장 하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: '/m702/m702a/saveDocu',
method: 'POST',
data: new FormData($("#rcptFrm")[0]),
processData: false,
contentType: false,
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",
draggable: true
})
},
success: function (result) {
if (result.code == '0') {
location.reload();
} else {
Swal.fire({
title: result.msg,
icon: "error",
draggable: true
})
}
}
});
}
});
} }
</script> </script>

View File

@@ -275,9 +275,14 @@ if (!empty($regist2)) {
<td> <td>
<input type="hidden" name="atcl_hscp_nm" id="atcl_hscp_nm" <input type="hidden" name="atcl_hscp_nm" id="atcl_hscp_nm"
value="<?= $data['hscp_nm'] ?>" /> value="<?= $data['hscp_nm'] ?>" />
<select class="form-select" name="atcl_hscp_no" id="atcl_hscp_no" <select class="form-select" name="atcl_hscp_no" id="atcl_hscp_no" disabled>
disabled="disabled"> <option value="">-단지선택-</option>
<option value="">-</option> <?php
foreach ($complexList['result'] as $complex): ?>
<option value="<?= $complex['rletNo'] ?>"
<?= ($complex['rletNo'] === $data['hscp_no']) ? 'selected' : '' ?>>
<?= $complex['rletNm'] ?>
<?php endforeach; ?>
</select> </select>
</td> </td>
<th>가격</th> <th>가격</th>

View File

@@ -88,7 +88,15 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</div> </div>
</div> </div>
<div class="col-md-12 col-xl-12"> <form name="rcptFrm" id="rcptFrm" method="post" action="" enctype="multipart/form-data" onsubmit="return false;">
<input type="hidden" name="address_code" id="address_code" value="<?= $data['address_code'] ?>" />
<input type="hidden" name="chTotal" id="chTotal" value="" />
<input type="hidden" name="reg_chk_val" value="<?= $data['rgbk_confirm'] ?>" />
<input type="hidden" name="rcpt_key" value="<?= $data['vr_sq'] ?>" />
<input type="hidden" name="tel_file_yn" value="<?php if (!empty($tel)) if ($tel['file_name']) {
echo "y";
} ?>" />
<div class="col-md-12 col-xl-12">
<div class="col-lg-12"> <div class="col-lg-12">
<div class="main-card mb-3 card"> <div class="main-card mb-3 card">
<div class="card-header" style="width:100%; max-width:100%; min-width:600px; padding:0; border:0;"> <div class="card-header" style="width:100%; max-width:100%; min-width:600px; padding:0; border:0;">
@@ -157,8 +165,8 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<th>전화/서류 완료일시</th> <th>전화/서류 완료일시</th>
<td> <td>
<select class="form-select form-select-sm" name="atcl_vrtc_way" id="atcl_vrtc_way" <select class="form-select form-select-sm" name="atcl_vrtc_way"
disabled> id="atcl_vrtc_way" disabled>
<option value="">-선택-</option> <option value="">-선택-</option>
<?php foreach ($codes as $c): ?> <?php foreach ($codes as $c): ?>
<?php if ($c['category'] === "VRFCREQ_WAY"): ?> <?php if ($c['category'] === "VRFCREQ_WAY"): ?>
@@ -196,28 +204,22 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<th>거래구분</th> <th>거래구분</th>
<td> <td>
<div class="d-flex flex-wrap gap-3"> <div class="d-flex flex-wrap gap-3">
<div class="form-check"> <div class="form-check" id="buy_tra_area1" style="display: none;">
<input class="form-check-input" type="radio" name="trade_type_cd" <input class="form-check-input" type="radio" name="trade_type_cd"
id="trade_type_1" value="B1" <?= ($data['trade_type_cd'] === 'B1') ? 'checked' : '' ?> disabled> id="buy_tra_cd1" value="B1" <?= ($data['trade_type_cd'] === 'B1') ? 'checked' : '' ?> disabled>
<label class="form-check-label" for="trade_type_1">전세</label> <label class="form-check-label" for="buy_tra_cd1">전세</label>
</div> </div>
<div class="form-check"> <div class="form-check" id="buy_tra_area2" style="display: none;">
<input class="form-check-input" type="radio" name="trade_type_cd" <input class="form-check-input" type="radio" name="trade_type_cd"
id="trade_type_2" value="B2" <?= ($data['trade_type_cd'] === 'B2') ? 'checked' : '' ?> disabled> id="buy_tra_cd2" value="B2" <?= ($data['trade_type_cd'] === 'B2') ? 'checked' : '' ?> disabled>
<label class="form-check-label" for="trade_type_2">월세</label> <label class="form-check-label" for="buy_tra_cd2">월세</label>
</div> </div>
<div class="form-check"> <div class="form-check" id="buy_tra_area3" style="display: none;">
<input class="form-check-input" type="radio" name="trade_type_cd" <input class="form-check-input" type="radio" name="trade_type_cd"
id="trade_type_4" value="B3" <?= ($data['trade_type_cd'] === 'B3') ? 'checked' : '' ?> disabled> id="buy_tra_cd3" value="A1" <?= ($data['trade_type_cd'] === 'A1') ? 'checked' : '' ?> disabled>
<label class="form-check-label" for="trade_type_4">단기임대</label> <label class="form-check-label" for="buy_tra_cd3">매매</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="trade_type_cd"
id="trade_type_3" value="A1" <?= ($data['trade_type_cd'] === 'A1') ? 'checked' : '' ?> disabled>
<label class="form-check-label" for="trade_type_3">매매</label>
</div> </div>
</div> </div>
</td> </td>
@@ -230,34 +232,35 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<th>리 주소</th> <th>리 주소</th>
<td> <td>
<input type="text" class="form-control form-control-sm" <input type="text" class="form-control form-control-sm" name="atcl_addr1a"
value="<?= $data['address2a'] ?>" disabled> id="atcl_addr1a" value="<?= $data['address2a'] ?>" disabled>
</td> </td>
</tr> </tr>
<tr> <tr>
<th>상세주소</th> <th>상세주소</th>
<td class="d-flex gap-1"> <td class="d-flex gap-1">
<?php if (empty($data['address2b'])): ?> <?php if (empty($data['address2b'])) { ?>
<input type="text" class="form-control form-control-sm" <input type="text" class="form-control form-control-sm" name="atcl_addr1"
value="<?= $data['address2'] ?>" disabled> id="atcl_addr1" value="<?= $data['address2'] ?>" size="70" disabled />
<input type="hidden" name="atcl_addr1b" id="atcl_addr1b" value=" "> <input type="hidden" class="form-control form-control-sm" name="atcl_addr1b"
<?php else: ?> id="atcl_addr1b" value="<?= $data['address2b'] ?>" size="70" disabled />
<input type="hidden" name="atcl_addr1" id="atcl_addr1" value=" "> <?php } else { ?>
<input type="text" class="form-control form-control-sm" <input type="hidden" class="form-control form-control-sm" name="atcl_addr1"
value="<?= $data['address2b'] ?>" disabled> id="atcl_addr1" value="<?= $data['address2'] ?>" size="70" disabled />
<?php endif; ?> <input type="text" class="form-control form-control-sm" name="atcl_addr1b"
id="atcl_addr1b" value="<?= $data['address2b'] ?>" size="70" disabled />
<input type="text" class="form-control form-control-sm" <?php } ?>
value="<?= $data['address3'] ?>" disabled> <input type="text" class="form-control form-control-sm" name="atcl_addr2"
id="atcl_addr2" value="<?= $data['address3'] ?>" size="70" disabled />
</td> </td>
</tr> </tr>
<tr> <tr>
<th>기타주소</th> <th>기타주소</th>
<td> <td>
<input type="text" class="form-control form-control-sm" <input type="text" class="form-control form-control-sm" name="atcl_addr3"
value="<?= $data['address4'] ?>" disabled> id="atcl_addr3" value="<?= $data['address4'] ?>" disabled>
</td> </td>
</tr> </tr>
@@ -266,19 +269,22 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<td> <td>
<input type="hidden" name="atcl_hscp_nm" id="atcl_hscp_nm" <input type="hidden" name="atcl_hscp_nm" id="atcl_hscp_nm"
value="<?= $data['hscp_nm'] ?>" /> value="<?= $data['hscp_nm'] ?>" />
<select class="form-select" name="atcl_hscp_no" id="atcl_hscp_no" disabled>
<option value="">-단지선택-</option>
<?php <?php
/* foreach ($complexList['result'] as $complex): ?>
$js = 'id="atcl_hscp_no" onchange="ajax_code_ptpList(this.value)" disabled="disabled"'; <option value="<?= $complex['rletNo'] ?>"
echo form_dropdown('atcl_hscp_no', $complexList, $data['hscp_no'], $js); <?= ($complex['rletNo'] === $data['hscp_no']) ? 'selected' : '' ?>>
*/ <?= $complex['rletNm'] ?>
?> <?php endforeach; ?>
</select>
</td> </td>
<th>가격</th> <th>가격</th>
<td> <td>
<!-- 기본 가격 --> <!-- 기본 가격 (매매) -->
<div class="align-items-center gap-2 mb-2" id="div_trade_type_price" <div id="div_trade_type_price" style="display: none;">
style="display: none;"> <div class="d-flex align-items-center gap-1">
<div class="input-group input-group-sm" style="max-width: 220px;"> <div class="input-group input-group-sm" style="max-width: 220px;">
<input type="text" class="form-control text-end" name="atcl_amt1" <input type="text" class="form-control text-end" name="atcl_amt1"
id="atcl_amt1" value="<?= $data['deal_amt'] ?>" disabled> id="atcl_amt1" value="<?= $data['deal_amt'] ?>" disabled>
@@ -286,64 +292,64 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</div> </div>
<?php if (in_array($usr_level, [1, 2])): ?> <?php if (in_array($usr_level, [1, 2])): ?>
<div class="form-check d-flex align-items-center mb-0"> <div class="form-check mb-0">
<input class="form-check-input mt-0" type="checkbox" id="price_ignore1" <input class="form-check-input" type="checkbox" id="price_ignore1"
disabled> disabled>
<label class="form-check-label ms-1 small" for="price_ignore1"> <label class="form-check-label small"
가격무시 for="price_ignore1">가격무시</label>
</label>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
<div class="align-items-center gap-1 mb-2" id="div_trade_type_price_monthly" <!-- 월세/전세 가격 -->
style="display: none;"> <div id="div_trade_type_price_monthly" style="display: none;">
<div class="input-group input-group-sm" style="max-width: 220px;"> <div class="d-flex align-items-center gap-1">
<div class="input-group input-group-sm" style="max-width: 120px;">
<input type="text" class="form-control text-end" name="atcl_amt2" <input type="text" class="form-control text-end" name="atcl_amt2"
id="atcl_amt2" value="<?= $data['wrrnt_amt'] ?>" disabled> id="atcl_amt2" value="<?= $data['wrrnt_amt'] ?>" disabled>
</div> / </div>
<div class="input-group input-group-sm" style="max-width: 220px;"> <span>/</span>
<div class="input-group input-group-sm" style="max-width: 120px;">
<input type="text" class="form-control text-end" name="atcl_amt3" <input type="text" class="form-control text-end" name="atcl_amt3"
id="atcl_amt3" value="<?= $data['lease_amt'] ?>" disabled> id="atcl_amt3" value="<?= $data['lease_amt'] ?>" disabled>
<span class="input-group-text">만원</span> <span class="input-group-text">만원</span>
</div> </div>
<?php if (in_array($usr_level, [1, 2])): ?> <?php if (in_array($usr_level, [1, 2])): ?>
<div class="form-check d-flex align-items-center mb-0"> <div class="form-check mb-0">
<input class="form-check-input mt-0" type="checkbox" id="price_ignore2" <input class="form-check-input" type="checkbox" id="price_ignore2"
disabled> disabled>
<label class="form-check-label ms-1 small" for="price_ignore2"> <label class="form-check-label small"
가격무시 for="price_ignore2">가격무시</label>
</label>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div> </div>
</div>
<!-- 분양가 / 프리미엄 --> <!-- 분양가 / 프리미엄 -->
<div id="div_trade_type_price2" style="display: none;"> <div id="div_trade_type_price2" style="display: none;">
<div class="d-flex flex-column gap-1">
<div class="align-items-center gap-2 mb-2"> <div class="d-flex align-items-center gap-1">
<div class="input-group input-group-sm" style="max-width: 220px;"> <div class="input-group input-group-sm" style="max-width: 220px;">
<input type="text" class="form-control text-end" name="atcl_amt4" <input type="text" class="form-control text-end"
id="atcl_amt4" value="<?= $data['deal_amt'] ?>" disabled> name="atcl_amt4" id="atcl_amt4"
value="<?= $data['deal_amt'] ?>" disabled>
<span class="input-group-text">만원</span> <span class="input-group-text">만원</span>
</div> </div>
<?php if (in_array($usr_level, [1, 2])): ?> <?php if (in_array($usr_level, [1, 2])): ?>
<div class="form-check d-flex align-items-center mb-0"> <div class="form-check mb-0">
<input class="form-check-input mt-0" type="checkbox" id="price_ignore1" <input class="form-check-input" type="checkbox"
disabled> id="price_ignore1" disabled>
<label class="form-check-label ms-1 small" for="price_ignore1"> <label class="form-check-label small"
가격무시 for="price_ignore1">가격무시</label>
</label>
</div> </div>
<?php endif; ?> <?php endif; ?>
</div>
<div class="row g-2">
<div class="col-6">
<div class="row g-2 align-items-center">
<div class="col-md-6">
<label class="form-label small mb-1 text-muted">분양가</label> <label class="form-label small mb-1 text-muted">분양가</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control text-end" <input type="text" class="form-control text-end"
@@ -354,11 +360,11 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</div> </div>
</div> </div>
<div class="col-md-6"> <div class="col-6">
<label class="form-label small mb-1 text-muted">프리미엄</label> <label class="form-label small mb-1 text-muted">프리미엄</label>
<div class="input-group input-group-sm"> <div class="input-group input-group-sm">
<input type="text" class="form-control text-end" name="prem_amt" <input type="text" class="form-control text-end"
id="prem_amt" name="prem_amt" id="prem_amt"
value="<?= str_replace(',', '', $data['prem_amt']) ?>" value="<?= str_replace(',', '', $data['prem_amt']) ?>"
disabled> disabled>
<span class="input-group-text">만원</span> <span class="input-group-text">만원</span>
@@ -373,21 +379,36 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>평형</th> <th>평형</th>
<td> <td>
<input type="hidden" name="atcl_ptp_nm" id="atcl_ptp_nm" value=""> <input type="hidden" name="atcl_ptp_nm" id="atcl_ptp_nm"
<select class="form-select form-select-sm" name="atcl_ptp_no" id="atcl_ptp_no" value="<?= $data['ptp_nm'] ?>" />
disabled> <?php if (!empty($ptpList['result'])): ?>
<select class="form-select" name="atcl_ptp_no" id="atcl_ptp_no" disabled>
<option value="">-평형-</option>
<?php foreach ($ptpList['result'] as $ptp):
$isSelected = ($ptp['ptpNo'] === $data['ptp_no']);
?>
<option value="<?= $ptp['ptpNo'] ?>" <?= $isSelected ? 'selected' : '' ?>>
<?= $ptp['ptpNm'] ?>
</option>
<?php endforeach; ?>
</select>
<?php else: ?>
<select class="form-select" name="atcl_ptp_no" id="atcl_ptp_no" disabled>
<option value="">-평형-</option> <option value="">-평형-</option>
</select> </select>
<?php endif; ?>
</td> </td>
<th>층 / 총층</th> <th>층 / 총층</th>
<td> <td>
<div class="d-flex align-items-center gap-2"> <div class="d-flex align-items-center gap-1">
<input type="text" class="form-control form-control-sm" style="max-width:80px;" <input type="text" class="form-control form-control-sm"
name="atcl_floor" id="atcl_floor" value="<?= $data['floor'] ?>" disabled> style="max-width:80px;" name="atcl_floor" id="atcl_floor"
value="<?= $data['floor'] ?>" disabled>
<span class="text-muted">/</span> <span class="text-muted">/</span>
<input type="text" class="form-control form-control-sm" style="max-width:80px;" <input type="text" class="form-control form-control-sm"
name="atcl_floor2" id="atcl_floor2" value="<?= $data['floor2'] ?>" disabled> style="max-width:80px;" name="atcl_floor2" id="atcl_floor2"
value="<?= $data['floor2'] ?>" disabled>
</div> </div>
</td> </td>
</tr> </tr>
@@ -416,9 +437,9 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
if (intval($data['try_cnt'] ?? 0) < 2): if (intval($data['try_cnt'] ?? 0) < 2):
?> ?>
<div class="card-footer d-flex justify-content-end gap-1"> <div class="card-footer d-flex justify-content-end gap-1">
<button class="mb-2 me-2 btn-transition btn btn-outline-secondary" id="priceModify"
style="display: none;">가격수정</button> <button class="mb-2 me-2 btn-transition btn btn-outline-secondary" id="btnModify"
<button class="mb-2 me-2 btn-transition btn btn-outline-secondary" id="btnModify">수정</button> onclick="editInfo();">수정</button>
<button class="mb-2 me-2 btn btn-primary" id="btnSave" disabled>저장</button> <button class="mb-2 me-2 btn btn-primary" id="btnSave" disabled>저장</button>
</div> </div>
@@ -500,7 +521,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<!-- 우측 : 정보 --> <!-- 우측 : 정보 -->
<td valign="top" class="pt-2"> <td valign="top" class="pt-2">
<table class="tbl_basic4 w-100 tbl_basic2 table-bordered"> <table class="table table-sm w-100 tbl_basic2 table-bordered">
<colgroup> <colgroup>
<col width="30%"> <col width="30%">
<col> <col>
@@ -520,7 +541,8 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<option value="">-선택-</option> <option value="">-선택-</option>
<?php foreach ($codes as $c): ?> <?php foreach ($codes as $c): ?>
<?php if ($c['category'] === "CONFIRM_RESULT_D11"): ?> <?php if ($c['category'] === "CONFIRM_RESULT_D11"): ?>
<option value="<?= $c['cd'] ?>" <?= ($c['cd'] === $data['result_d11']) ? 'selected' : '' ?>> <option value="<?= $c['cd'] ?>"
<?= ($c['cd'] === $data['result_d11']) ? 'selected' : '' ?>>
<?= $c['cd_nm'] ?> <?= $c['cd_nm'] ?>
</option> </option>
<?php endif; ?> <?php endif; ?>
@@ -532,7 +554,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>홍보확인서<br>미확인여부상세</th> <th>홍보확인서<br>미확인여부상세</th>
<td> <td>
<table class="w-100 tbl_basic2 table-bordered"> <table class="table w-100 tbl_basic2 table-bordered">
<tr> <tr>
<?php <?php
$checks = explode('|', $data['comment']); $checks = explode('|', $data['comment']);
@@ -605,7 +627,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>매물주소</th> <th>매물주소</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" id="fax_conf_yn_2"> <select class="form-select" id="fax_conf_yn_2">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['fax_conf_yn_2'] == '10000') <option value="10000" <?php if ($data['fax_conf_yn_2'] == '10000')
@@ -620,7 +642,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>가격 거래구분</th> <th>가격 거래구분</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" id="fax_conf_yn_3"> <select class="form-select" id="fax_conf_yn_3">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000">일치</option> <option value="10000">일치</option>
@@ -633,7 +655,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>의뢰인정보</th> <th>의뢰인정보</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" id="fax_conf_yn_4"> <select class="form-select" id="fax_conf_yn_4">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000">일치</option> <option value="10000">일치</option>
@@ -649,10 +671,10 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<td class="d-flex align-items-end gap-1"> <td class="d-flex align-items-end gap-1">
<textarea class="form-control" id="memo_fax" rows="2" <textarea class="form-control" id="memo_fax" rows="2"
style="resize: none;"><?= $memo['memo'] ?></textarea> style="resize: none;"><?= $memo['memo'] ?></textarea>
<button type="button" class="btn btn-sm btn-outline-secondary" <!-- <button type="button" class="btn btn-sm btn-outline-secondary"
onclick="saveMemo('fax');" style="white-space: nowrap;"> onclick="saveMemo('fax');" style="white-space: nowrap;">
저장 저장
</button> </button> -->
</td> </td>
</tr> </tr>
</tbody> </tbody>
@@ -727,7 +749,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<!-- 기존 업로드된 파일 정보 --> <!-- 기존 업로드된 파일 정보 -->
<?php if (!empty($tel)) { ?> <?php if (!empty($tel)) { ?>
<div class="mb-2 small"> <div class="mb-2 small">
<div class="d-flex align-items-center gap-2 flex-wrap"> <div class="d-flex align-items-center gap-1 flex-wrap">
<a href="<?= $tel['file_url'] ?? '#' ?>" class="text-decoration-none"> <a href="<?= $tel['file_url'] ?? '#' ?>" class="text-decoration-none">
<i class="fa fa-file-audio-o me-1"></i><?= $tel['file_name'] ?> <i class="fa fa-file-audio-o me-1"></i><?= $tel['file_name'] ?>
</a> </a>
@@ -738,9 +760,9 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<?php } ?> <?php } ?>
<!-- 파일 업로드 --> <!-- 파일 업로드 -->
<div class="d-flex align-items-center gap-2 mb-2"> <div class="d-flex align-items-center gap-1 mb-2">
<input class="form-control form-control-sm" id="virtualFileTextBox1" readonly="readonly" <input class="form-control form-control-sm" id="virtualFileTextBox1"
placeholder="파일을 선택하세요" style="max-width:260px;" /> readonly="readonly" placeholder="파일을 선택하세요" style="max-width:260px;" />
<label class="btn btn-sm btn-outline-secondary mb-0"> <label class="btn btn-sm btn-outline-secondary mb-0">
<i class="fa fa-upload me-1"></i> 업로드 <i class="fa fa-upload me-1"></i> 업로드
@@ -769,7 +791,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>매물주소</th> <th>매물주소</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="tel_conf_yn_2" id="tel_conf_yn_2" disabled="disabled"> <select class="form-select" name="tel_conf_yn_2" id="tel_conf_yn_2" disabled="disabled">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['tel_conf_yn_2'] == '10000') <option value="10000" <?php if ($data['tel_conf_yn_2'] == '10000')
@@ -779,13 +801,14 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
echo "selected"; ?>>불일치 echo "selected"; ?>>불일치
</option> </option>
</select> </select>
<input type="text" class="form-control" name="tel_conf_yn_info_2" id="tel_conf_yn_info_2" <input type="text" class="form-control" name="tel_conf_yn_info_2"
id="tel_conf_yn_info_2"
value="<?= str_replace(',', '', $data['tel_conf_yn_info_2']) ?>" size="20" /> value="<?= str_replace(',', '', $data['tel_conf_yn_info_2']) ?>" size="20" />
</td> </td>
</tr> </tr>
<tr> <tr>
<th>가격 거래구분</th> <th>가격 거래구분</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="tel_conf_yn_3" id="tel_conf_yn_3" disabled="disabled"> <select class="form-select" name="tel_conf_yn_3" id="tel_conf_yn_3" disabled="disabled">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['tel_conf_yn_3'] == '10000') <option value="10000" <?php if ($data['tel_conf_yn_3'] == '10000')
@@ -795,13 +818,14 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
echo "selected"; ?>>불일치 echo "selected"; ?>>불일치
</option> </option>
</select> </select>
<input type="text" class="form-control" name="tel_conf_yn_info_3" id="tel_conf_yn_info_3" <input type="text" class="form-control" name="tel_conf_yn_info_3"
id="tel_conf_yn_info_3"
value="<?= str_replace(',', '', $data['tel_conf_yn_info_3']) ?>" size="20" /> value="<?= str_replace(',', '', $data['tel_conf_yn_info_3']) ?>" size="20" />
</td> </td>
</tr> </tr>
<tr> <tr>
<th>의뢰인정보</th> <th>의뢰인정보</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="tel_conf_yn_4" id="tel_conf_yn_4" disabled="disabled"> <select class="form-select" name="tel_conf_yn_4" id="tel_conf_yn_4" disabled="disabled">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['tel_conf_yn_4'] == '10000') <option value="10000" <?php if ($data['tel_conf_yn_4'] == '10000')
@@ -811,7 +835,8 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
echo "selected"; ?>>불일치 echo "selected"; ?>>불일치
</option> </option>
</select> </select>
<input type="text" class="form-control" name="tel_conf_yn_info_4" id="tel_conf_yn_info_4" <input type="text" class="form-control" name="tel_conf_yn_info_4"
id="tel_conf_yn_info_4"
value="<?= str_replace(',', '', $data['tel_conf_yn_info_4']) ?>" size="20" /> value="<?= str_replace(',', '', $data['tel_conf_yn_info_4']) ?>" size="20" />
</td> </td>
</tr> </tr>
@@ -821,16 +846,16 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<div class="d-flex justify-content-start gap-3"> <div class="d-flex justify-content-start gap-3">
<div class="form-check d-flex align-items-center mb-0"> <div class="form-check d-flex align-items-center mb-0">
<input class="form-check-input" type="checkbox" name="tel_conf_yn_5" id="fail_chk1" <input class="form-check-input" type="checkbox" name="tel_conf_yn_5"
value="20040" onclick="check_only_fail(this)"> id="fail_chk1" value="20040" onclick="check_only_fail(this)">
<label class="form-check-label ms-1" for="fail_chk1"> <label class="form-check-label ms-1" for="fail_chk1">
주소정보 오기재 주소정보 오기재
</label> </label>
</div> </div>
<div class="form-check d-flex align-items-center mb-0"> <div class="form-check d-flex align-items-center mb-0">
<input class="form-check-input" type="checkbox" name="tel_conf_yn_5" id="fail_chk2" <input class="form-check-input" type="checkbox" name="tel_conf_yn_5"
value="20041" onclick="check_only_fail(this)"> id="fail_chk2" value="20041" onclick="check_only_fail(this)">
<label class="form-check-label ms-1" for="fail_chk2"> <label class="form-check-label ms-1" for="fail_chk2">
동일 번호 등록제한 동일 번호 등록제한
</label> </label>
@@ -855,7 +880,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</div> </div>
</td> </td>
<th>통화실패사유</th> <th>통화실패사유</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="tel_fail_cause" id="tel_fail_cause"> <select class="form-select" name="tel_fail_cause" id="tel_fail_cause">
<?php foreach ($codes as $c): ?> <?php foreach ($codes as $c): ?>
<?php if ($c['category'] === "TEL_FAIL_CAUSE"): ?> <?php if ($c['category'] === "TEL_FAIL_CAUSE"): ?>
@@ -885,19 +910,19 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<!-- 등기부등본 정보 --> <!-- 등기부등본 정보 -->
<div class="main-card mb-3 card" id="regibox"> <div class="main-card mb-3 card" id="regibox">
<div class="card-body"> <div class="card-body p-2">
<h5 class="card-title">등기부등본확인 정보</h5> <h5 class="card-title">등기부등본확인 정보</h5>
<table class="table table-bordered table-sm tbl_basic2 apt-info-table"> <table class="table table-bordered table-sm tbl_basic2 apt-info-table">
<colgroup> <colgroup>
<col width="60%"> <col width="65%">
<col> <col width="35%">
</colgroup> </colgroup>
<tbody> <tbody>
<tr> <tr>
<!-- 좌측 : 이미지 --> <!-- 좌측 : 이미지 -->
<td> <td class="p-2">
<?php if (!empty($data['cert_register'])): ?> <?php if (!empty($data['cert_register'])): ?>
<?php if ($data['cert_register_save_yn'] == 'Y'): ?> <?php if ($data['cert_register_save_yn'] == 'Y'): ?>
<?php if (strtolower($file_pdf) == 'pdf') { ?> <?php if (strtolower($file_pdf) == 'pdf') { ?>
@@ -972,7 +997,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<!-- 우측 : 정보 --> <!-- 우측 : 정보 -->
<td valign="top" class="pt-2"> <td valign="top" class="pt-2">
<table class="tbl_basic4 w-100 tbl_basic2 table-bordered"> <table class="table table-sm w-100 tbl_basic2 table-bordered">
<colgroup> <colgroup>
<col width="30%"> <col width="30%">
<col> <col>
@@ -1005,7 +1030,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
<tr> <tr>
<th>매물주소</th> <th>매물주소</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="reg_conf_yn_2" id="reg_conf_yn_2"> <select class="form-select" name="reg_conf_yn_2" id="reg_conf_yn_2">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['reg_conf_yn_2'] == '10000') <option value="10000" <?php if ($data['reg_conf_yn_2'] == '10000')
@@ -1022,7 +1047,7 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</tr> </tr>
<tr> <tr>
<th>의뢰인정보</th> <th>의뢰인정보</th>
<td class="d-flex gap-2"> <td class="d-flex gap-1">
<select class="form-select" name="reg_conf_yn_3" id="reg_conf_yn_3"> <select class="form-select" name="reg_conf_yn_3" id="reg_conf_yn_3">
<option value="">-선택-</option> <option value="">-선택-</option>
<option value="10000" <?php if ($data['reg_conf_yn_3'] == '10000') <option value="10000" <?php if ($data['reg_conf_yn_3'] == '10000')
@@ -1038,30 +1063,17 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</td> </td>
</tr> </tr>
<?php if ($data['vrfc_type_cd'] == "N"): ?>
<tr>
<th>소유자명 확인</th>
<td>
<select class="form-select" name="ownerVerifiable" id="ownerVerifiable">
<option value="">-선택-</option>
<option value="1" <?php if ($data['owner_verifiable'] == "1")
echo "selected"; ?>>일치</option>
<option value="0" <?php if ($data['owner_verifiable'] == "0")
echo "selected"; ?>>불일치</option>
</select>
</td>
</tr>
<?php endif; ?>
<tr> <tr>
<th>메모</th> <th>메모</th>
<td class="d-flex align-items-end gap-1"> <td class="d-flex align-items-end gap-1">
<textarea type="text" class="form-control" name="memo_reg" id="memo_reg" <textarea type="text" class="form-control" name="memo_reg"
style="width:300px; height:45px;resize: none;"><?= $memo['memo'] ?></textarea> id="memo_reg"
style="height:45px;resize: none;"><?= $memo['memo'] ?></textarea>
<button class="btn btn-sm btn-light" style="white-space: nowrap;" <!-- <button class="btn btn-sm btn-light" style="white-space: nowrap;"
onclick="saveMemo();"> onclick="saveMemo();">
저장 저장
</button> </button> -->
</td> </td>
</tr> </tr>
@@ -1139,7 +1151,8 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
</div> </div>
</div> </div>
</div> </div>
</form>
<script type="text/javascript"> <script type="text/javascript">
@@ -1161,18 +1174,11 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
} }
if (but_ty == "A1") { if (but_ty == "A1") {
$("#buy_tra_cd3").show(); $("#buy_tra_area3").show();
$("#div_trade_type_price").show(); $("#div_trade_type_price").show();
if (rlet_type_cd == "B01" || rlet_type_cd == "B02" || rlet_type_cd == "B03") {
$("#div_trade_type_price").hide();
$("#div_trade_type_price2").show();
}
} else { } else {
$("#buy_tra_cd1").show(); $("#buy_tra_area1").show();
$("#buy_tra_cd2").show(); $("#buy_tra_area2").show();
$("#buy_tra_cd4").show();
$("#div_trade_type_price_monthly").show(); $("#div_trade_type_price_monthly").show();
} }
@@ -1215,5 +1221,403 @@ if (!empty($list['cert_register']) && $list['cert_register_save_yn'] != 'Y') { /
}); });
function editInfo() {
const rletNo = '<?= $data['hscp_no'] ?>';
document.getElementById('atcl_vrtc_way').disabled = false;
document.getElementById('atcl_addr1').disabled = false;
document.getElementById('atcl_addr1a').disabled = false;
document.getElementById('atcl_addr1b').disabled = false;
document.getElementById('atcl_addr2').disabled = false;
//document.getElementById('atcl_addr3').disabled = false;
document.getElementById('atcl_amt1').disabled = false;
document.getElementById('atcl_amt2').disabled = false;
document.getElementById('atcl_amt3').disabled = false;
document.getElementById('atcl_floor').disabled = false;
document.getElementById('atcl_floor2').disabled = false;
document.getElementById('atcl_hscp_no').disabled = false;
document.getElementById('atcl_ptp_no').disabled = false;
$('input[name=trade_type_cd]').attr("disabled", false);
$('#btnSilverReadLatLng').removeAttr('disabled');
$('#btnSilverModifyMap').removeAttr('disabled');
$('#btnGreenModifyInfo').removeAttr('disabled');
}
// 매물정보 수정
function modifyInfo() {
var chkvrfc_hscp = '<?= $data['hscp_no'] ?>';
var chkvrfc_ptp = '<?= $data['ptp_no'] ?>';
var td_ty = '<?= $data['trade_type_cd'] ?>';
// 검증구분
var atcl_vrtc_way = $.trim($('#atcl_vrtc_way').val());
if (atcl_vrtc_way == '') {
Swal.fire('검증구분을 선택하세요.');
$("#atcl_vrtc_way").focus();
return false;
}
if (chkvrfc_hscp != '' && chkvrfc_ptp != '') {
var atcl_hscp_no = $("#atcl_hscp_no option:selected").val();
if (atcl_hscp_no == '') {
Swal.fire('단지명을 선택해주세요.');
$("#atcl_hscp_no").focus();
return false;
}
var atcl_ptp_no = $("#atcl_ptp_no option:selected").val();
if (atcl_ptp_no == '') {
Swal.fire('평형을 선택해주세요.');
$("#atcl_ptp_no").focus();
return false;
}
$("#atcl_hscp_nm").val($("#atcl_hscp_no option:selected").text());
$("#atcl_ptp_nm").val($("#atcl_ptp_no option:selected").text());
} else {
// 거래구분
var cntChecked = $('input[name="trade_type_cd"]:checked').length;
if (cntChecked == 0) {
Swal.fire("거래구분을 선택하세요");
return false;
}
// 상세주소
var atcl_addr1 = $.trim($('#atcl_addr1').val());
var atcl_addr1b = $.trim($('#atcl_addr1b').val());
if (atcl_addr1b == '' && atcl_addr1 == '') {
Swal.fire('상세주소를 입력하세요.');
//$("#atcl_addr1b").focus();
return false;
}
var atcl_addr2 = $.trim($('#atcl_addr2').val());
if (atcl_addr2 == '') {
Swal.fire('상세주소를 입력하세요.');
$("#atcl_addr2").focus();
return false;
}
}
//가격
if (td_ty == 'A1') { //매매일때
var atcl_amt1 = $.trim($('#atcl_amt1').val());
if (atcl_amt1 == '') {
Swal.fire('가격을 입력해주세요.');
$("#atcl_amt1").focus();
return false;
}
} else { //전세나 월세일 때
var atcl_amt2 = $.trim($('#atcl_amt2').val());
if (atcl_amt2 == '') {
Swal.fire('가격을 입력해주세요.');
$("#atcl_amt2").focus();
return false;
}
var atcl_amt3 = $.trim($('#atcl_amt3').val());
if (atcl_amt3 == '') {
Swal.fire('가격을 입력해주세요.');
$("#atcl_amt3").focus();
return false;
}
}
//층
var atcl_floor = $.trim($('#atcl_floor').val());
if (atcl_floor == '') {
Swal.fire('층을 입력해주세요.');
$("#atcl_floor").focus();
return false;
}
swal.fire({
text: "확인결과를 저장하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: '/m706/m706a/modifyInfo',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: $("#rcptFrm").serialize(),
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 saveDocu() {
var frm = document.rcptFrm;
if (frm.fax_conf_res_d11.value == "") {
Swal.fire("확인여부를 선택해주세요");
frm.fax_conf_res_d11.focus();
return false;
}
var chValue = "";
var i = 1;
for (i = 1; i <= 14; i++) {
if ($('#ch' + i).is(':checked') == true) {
chValue = chValue + "|Y";
} else {
chValue = chValue + "|N";
}
}
//alert(chValue);
chValue = chValue.substr(1);
$('#chTotal').val(chValue);
if (frm.fax_conf_yn_2.value == "") {
Swal.fire("매물주소 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_2.focus();
return false;
}
if (frm.fax_conf_yn_3.value == "") {
Swal.fire("가격 거래구분 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_3.focus();
return false;
}
if (frm.fax_conf_yn_4.value == "") {
Swal.fire("의뢰인 정보확인 결과를 선택해주세요");
frm.fax_conf_yn_4.focus();
return false;
}
if (frm.fax_conf_yn_2.value == "20000") {
if (frm.fax_conf_yn_info_2.value == "") {
Swal.fire("매물주소 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_2.focus();
return false;
}
}
if (frm.fax_conf_yn_3.value == "20000") {
if (frm.fax_conf_yn_info_3.value == "") {
Swal.fire("가격 거래구분 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_3.focus();
return false;
}
}
if (frm.fax_conf_yn_4.value == "20000") {
if (frm.fax_conf_yn_info_4.value == "") {
Swal.fire("의뢰인정보 불일치에 대한 상세내용을 작성해주세요");
frm.fax_conf_yn_info_4.focus();
return false;
}
}
swal.fire({
text: "저장 하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: '/m706/m706a/saveDocu',
method: 'POST',
data: new FormData($("#rcptFrm")[0]),
processData: false,
contentType: false,
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",
draggable: true
})
},
success: function (result) {
if (result.code == '0') {
location.reload();
} else {
Swal.fire({
title: result.msg,
icon: "error",
draggable: true
})
}
}
});
}
});
}
// 등기부등본 정보 저장
function saveRegi() {
var frm = document.rcptFrm;
if (frm.reg_conf_yn_2.value == "") {
Swal.fire("매물주소 정보확인 결과를 선택해주세요");
frm.reg_conf_yn_2.focus();
return false;
}
if (frm.reg_conf_yn_3.value == "") {
Swal.fire("의뢰인정보 확인 결과를 선택해주세요");
frm.reg_conf_yn_3.focus();
return false;
}
if (frm.reg_conf_yn_2.value == "20000") {
if (frm.reg_conf_yn_info_2.value == "") {
Swal.fire("매물주소 불일치에 대한 상세내용을 작성해주세요");
frm.reg_conf_yn_info_2.focus();
return false;
}
}
if (frm.reg_conf_yn_3.value == "20000") {
if (frm.reg_conf_yn_info_3.value == "") {
Swal.fire("의뢰인정보 불일치에 대한 상세내용을 작성해주세요");
frm.reg_conf_yn_info_3.focus();
return false;
}
}
swal.fire({
text: "저장 하시겠습니까?",
type: "warning",
showCancelButton: true,
confirmButtonText: "예",
cancelButtonText: "아니오",
closeOnConfirm: false,
closeOnCancel: true,
confirmButtonColor: "#3085d6",
cancelButtonColor: "#d33",
}).then((result) => {
if (result.isConfirmed) {
$.ajax({
url: '/m706/m706a/saveRegi',
contentType: 'application/x-www-form-urlencoded;charset=UTF-8',
method: 'POST',
data: $("#rcptFrm").serialize(),
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"
})
}
}
});
}
});
}
</script> </script>
<?= $this->endSection() ?> <?= $this->endSection() ?>