Commit 60d6981a authored by esf's avatar esf

bug

parent 4674aa67
......@@ -4792,8 +4792,7 @@ class Sell extends MY_Controller {
mysql_close($databaseSellWarning);
// Order By Time
$array = array();
/*$array = array();
foreach($data_info as $value){
if(!empty($value['freeze_info']['freezetime'])){
$array[intval($value['freeze_info']['freezetime'])] = $value;
......@@ -4805,7 +4804,7 @@ class Sell extends MY_Controller {
}
}
krsort($array);
$data_info = $array;
$data_info = $array;*/
}
}
$data['data_info'] = $data_info;
......@@ -7081,6 +7080,63 @@ class Sell extends MY_Controller {
echo json_encode($re);die;
}
//冻结房源删除
public function house_frozen_del()
{
$rowid = $this->input->get( 'rowid' , TRUE );
$secret_key = $this->input->get( 'secret_key' , TRUE );
if( intval($rowid) > 0 && md5('HOUSE365_SELL_APPEAL_'.$rowid) == $secret_key )
{
$uid = $this->user_arr['uid'];
$agentcode = $this->user_arr['agentcode'];
/*** 1、删除房源 ***/
$delete_num = 0;
$this->load->model('sell_operate_model');
$delete_num = $this->sell_operate_model->delete_house($rowid);
if( $delete_num > 0 )
{
//加载中间件统计类
$this->load->library('statistics');
//加载门店类
$this->load->model('agency_model');
$relation_info = array();
$relation_info = $this->agency_model->get_relation_by_agentcode($agentcode);
$domain = isset($relation_info['cat_id']) ? $relation_info['cat_id'] : 0;
$parentcode = '';
if( is_array($relation_info) && !empty($relation_info)) {
$parentcode = isset($relation_info['parentcode']) ? $relation_info['parentcode'] : '';
}else{
$parentinfo = array();
$select_array = array('parentcode');
$this->agency_model->set_select_fields($select_array);
$parentinfo = $this->agency_model->get_company_info_by_code($agentcode);
$parentcode = isset($parentinfo['parentcode']) ? $parentinfo['parentcode'] : '';
}
/*** 4、通过接口提交操作日志给中间件,operatetype 1:新增 2刷新 3删除 4失效 5再发布 ***/
$this->statistics->sub_operatecount( $uid , $agentcode , 3 , $rowid , '' , 'sell' , $domain , $parentcode );
/*** 5、提交房源操作日志给MYSQL(经纪人日志查询),[$msg:4-失效房源] ***/
$this->sell_model->action_log( $agentcode , $uid , 'sell' , $rowid , 0);
$result['is_ok'] = 1;
$msg = '操作成功';
}else{
$result['is_ok'] = 0;
$msg = '删除房源失败。';
}
/** 删除结束 **/
} else {
$result['is_ok'] = 0;
$msg = '参数错误';
}
$result['msg'] = iconv( 'gb2312' , 'utf-8', $msg );
echo json_encode($result);
exit;
}
}
/* End of file sell.php */
......
......@@ -215,6 +215,8 @@
<span class="fg">|</span>
<?php if($value['freeze_info']["esta"] != 2 ) { ?>
<a href="###" class="link" onclick="appeal(<?php echo $value['id'];?> ,<?php echo $value['esta'];?>, '<?php echo date("Y-m-d H:i",$value['freeze_info']["freezetime"]);?>','<?php echo $value['freeze_info']['reason'];?>','<?php echo md5("HOUSE365_SELL_APPEAL_".$value["id"]);?>',this);">申诉</a>
<span class="fg">|</span>
<a href="###" class="link" onclick="selldel(<?php echo $value['id'];?>,'<?php echo md5("HOUSE365_SELL_APPEAL_".$value["id"]);?>')">删除</a>
<?php } else{ ?>
受理中
<?php }?>
......@@ -299,8 +301,30 @@
<div class="text" id="dialog_tip"></div>
</div>
</div>
<!-- 冻结删除 -->
<div id="pop_dialog" class="dialog radius5">
<div class="hd">
<h3 class="h3">提示</h3>
<span title="关闭" class="close close-win">&Chi;</span> </div>
<div class="mod">
<div class="text" id="pop_tips"></div>
<div style="padding:20px 0 0 65px;">
<a href="###" class="btn btnConColor radius5 " onclick="selldelajax();close_confirm_window()">确定</a>
<a href="###" class="btn btnCon radius5 close-win">取消</a>
<input type ="hidden" id="pop_rowid" value="">
<input type ="hidden" id="pop_secret_key" value="">
</div>
</div>
</div>
<!-- 成功提示 -->
<div id="pop_success" class="dialog radius5">
<div class="hd">
<h3 class="h3">提示</h3>
</div>
<div class="mod">
<div class="text" id="pop_success_tips"></div>
</div>
</div>
<script type="text/javascript">
function words_deal()
{
......@@ -435,5 +459,35 @@ function appeal_add ()
//$("#gTipsCoverjsDialogNeighborhoodComplain").remove();
}
function selldel(rowid,secret_key){
$("#pop_tips").html('确定删除房源:'+rowid);
$("#pop_rowid").val(rowid);
$("#pop_secret_key").val(secret_key);
openWin('pop_dialog');
}
//冻结房源删除功能
function selldelajax(){
openWin('docation_loading');
var rowid = $("#pop_rowid").val();
var secret_key = $("#pop_secret_key").val();
$.ajax({
type: 'get',
url : '<?php echo GB_WO_URL;?>/sell/house_frozen_del/',
data: {'secret_key':secret_key , 'rowid':rowid},
dataType:'json',
success: function(data) {
$("#gTipsCoverdialogtc").remove();
$("#docation_loading").hide();
if( data.is_ok == '1' ) {
$("#pop_success_tips").html(data.msg);
openWin('pop_success');
setTimeout('location.reload()',2000);
}else{
$("#dialogts #dialog_tip").html(data.msg);
openWin('dialogts');
}
}
});
}
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment