edit-admin-clues
This commit is contained in:
@@ -758,10 +758,15 @@ class Clues extends HD_Controller
|
||||
$this->data['data'] = $rows;
|
||||
return $this->show_json(SYS_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
public function get_city(){
|
||||
$citys = $this->city_ary();
|
||||
$this->data['citys'] = $citys;
|
||||
|
||||
public function get_bizInfo(){
|
||||
$id = $this->input->get('id');
|
||||
$info = $this->biz_model->get(['id'=>$id],'city_id,county_id,address');
|
||||
$city = $this->area_model->get(['county_id'=>$info['county_id']]);
|
||||
$bizinfo['city_name'] = $city['city_name'];
|
||||
$bizinfo['county_name'] = $city['county_name'];
|
||||
$bizinfo['address'] = $info['address'];
|
||||
$this->data['bizinfo'] = $bizinfo;
|
||||
return $this->show_json(SYS_CODE_SUCCESS);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,9 +212,9 @@
|
||||
<td class="table-td" colspan="3">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">推荐门店:</div>
|
||||
<span v-for="(val,key) in infoShow['near_bizs']" :class="'label ml5 '+randClass()">
|
||||
<button v-for="(val,key) in infoShow['near_bizs']" :class="'btn ml5 btn-xs btn-'+randClass()" @click="showBizInfo(val)">
|
||||
{{val.biz_name}}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -293,6 +293,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-u-lg-12" id="modal-biz-info" style="display:none">
|
||||
<table width="100%" style="margin:0px 0px 10px 0px;">
|
||||
<tr>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">城市地区:</div>
|
||||
{{bizInfo.city_name}}-{{bizInfo.county_name}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="table-td">
|
||||
<div class="input-group">
|
||||
<div class="input-group-addon">详细地址:</div>
|
||||
{{bizInfo.address}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -306,7 +326,8 @@
|
||||
infoShow: {"intention": {}, 'autoList': []},
|
||||
goods: {"imgs_url": [], "imgs": [], "log": ''},
|
||||
cityAry:[],
|
||||
countyAry:[]
|
||||
countyAry:[],
|
||||
bizInfo:[],
|
||||
},
|
||||
mounted: function () {
|
||||
var that = this;
|
||||
@@ -506,9 +527,24 @@
|
||||
});
|
||||
},
|
||||
randClass:function(){
|
||||
var classArr = ['label-default','label-primary','label-success','label-info','label-warning','label-danger'];
|
||||
var classArr = ['default','primary','success','info','warning','danger'];
|
||||
var rand = Math.floor( Math.random() * classArr.length );
|
||||
return classArr[rand]
|
||||
},
|
||||
showBizInfo:function(info){
|
||||
var that = this
|
||||
$.get('/receiver/clues/get_bizInfo',{'id':info.id},function(response){
|
||||
if(response.code){
|
||||
that.bizInfo = response.data.bizinfo
|
||||
layer.open({
|
||||
type: 1, //Page层类型
|
||||
title: info.biz_name,
|
||||
shade: false,
|
||||
area: ['420px', '240px'], //宽高
|
||||
content: $("#modal-biz-info")
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
|
||||
@@ -18,8 +18,7 @@
|
||||
<div class="coms-table-wrap mt10">
|
||||
<form class="form-search coms-table-hd clearfix no-border" onsubmit="return false"
|
||||
action="/receiver/clues" id="search_form">
|
||||
<input type="hidden" name="status_pid" value="<?= $params['status_pid'] != -99 ? $params['status_pid'] : '' ?>">
|
||||
<input type="hidden" name="status_id" value="<?= $params['status_id'] ?>">
|
||||
<input name="status" value="<?=$params['status']?>" type="hidden">
|
||||
<div class="am-form am-form-horizontal">
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">客户搜索:</label>
|
||||
|
||||
@@ -167,7 +167,11 @@ class Aptinfo extends Wxapp{
|
||||
$id = $this->clues_model->add($add_data);
|
||||
if($id){
|
||||
$this->load->library('receiver/clues_entity');
|
||||
$this->clues_entity->add_log($id, $this->session['uid'], $this->session['nickname'], "用户报名");
|
||||
$uname = $this->session['nickname'] ? $this->session['nickname'] : '用户';
|
||||
$cf_title = $this->clues_entity->cf_title($cf_id);
|
||||
$log_msg = '用户报名';
|
||||
$cf_title && $log_msg = "用户通过【{$cf_title}】报名";
|
||||
$this->clues_entity->add_log($id, $this->session['uid'], $uname, $log_msg);
|
||||
}
|
||||
throw new Exception('预约成功', API_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,22 @@ class Clues_entity{
|
||||
$r_id = $this->ci->oplogs_model->add($data);
|
||||
return $r_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取cfrom标题
|
||||
* @param $cf_id int 来源id
|
||||
* return string
|
||||
*/
|
||||
public function cf_title($cf_id){
|
||||
$this->ci->load->model('receiver/receiver_clues_cfrom_model','cfrom_model');
|
||||
$row = $this->ci->cfrom_model->get(['id'=>$cf_id],'id,pid,title');
|
||||
$cf_title = $row['title'];
|
||||
if($row['pid']){
|
||||
$pid_row = $this->ci->cfrom_model->get(['id'=>$row['pid']],'id,pid,title');
|
||||
$cf_title = $pid_row['title'].'-'.$cf_title;
|
||||
}
|
||||
return $cf_title;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user