add-clues-position
This commit is contained in:
@@ -20,6 +20,7 @@ class Clues extends HD_Controller
|
||||
$this->load->model('auto/auto_brand_model', 'mdAutoBrand');
|
||||
$this->load->model('auto/auto_series_model', 'mdAutoSeries');
|
||||
$this->load->model('auto/auto_attr_model', 'mdAutoAttr');
|
||||
$this->load->model('area_model');
|
||||
$this->log_dir = 'receiver_clues';
|
||||
}
|
||||
|
||||
@@ -34,6 +35,26 @@ class Clues extends HD_Controller
|
||||
$status_arr = $this->clues_model->get_status();
|
||||
$params = $this->input->get();
|
||||
|
||||
$this->data['province_id'] = $province_id = 350;//默认福建城市
|
||||
$this->data['city_id'] = $city_id = intval($params['city_id']);
|
||||
$this->data['county_id'] = $county_id = intval($params['county_id']);
|
||||
$this->data['provinces'] = $this->area_model->select(array(), '', 0, 0, 'distinct(province_id), province_name');
|
||||
if($province_id){
|
||||
//获取系统配置的城市
|
||||
$map_city = $this->city_ary();
|
||||
$rows_city = array();
|
||||
foreach($map_city as $k => $v){
|
||||
$rows_city[] = array(
|
||||
'city_id' => $k,
|
||||
'city_name' => $v
|
||||
);
|
||||
}
|
||||
$this->data['citys'] = $rows_city;
|
||||
}
|
||||
if($city_id){
|
||||
$this->data['countys'] = $this->area_model->select(array('city_id' => $city_id));
|
||||
}
|
||||
|
||||
$page = $params['page'] = $params['page'] ? intval($params['page']) : 1;
|
||||
$size = $params['size'] = $params['size'] ? intval($params['size']) : 20;
|
||||
|
||||
@@ -53,6 +74,8 @@ class Clues extends HD_Controller
|
||||
}
|
||||
}
|
||||
strlen($params['status']) && $where["status"] = $params['status'];
|
||||
$city_id && $where['city_id'] = $city_id;
|
||||
$county_id && $where['county_id'] = $county_id;
|
||||
|
||||
$count = $this->clues_model->count($where);
|
||||
$lists = [];
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
<a href="javascript:void(0)" class="am-btn am-btn-sm am-btn-success"
|
||||
@click="saveEdit()">修改状态</a>
|
||||
</div>
|
||||
<div class="am-form-group ml10" >
|
||||
<a href="javascript:void(0)" class="am-btn am-btn-sm am-btn-success" onclick="edit_adviser()">分配</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -513,6 +516,10 @@
|
||||
});
|
||||
});
|
||||
|
||||
function edit_adviser() {
|
||||
var ids = '<?=$info['id']?>'
|
||||
return $.form.modal("/receiver/clues/get_adviser?ids=" + ids, 'open_type=modal', "分配顾问");
|
||||
}
|
||||
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -37,6 +37,45 @@
|
||||
<input id="title" name="title" type="text" value="<?= $params['title'] ?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w100">报名位置:</label>
|
||||
<div class="am-form-group am-para-inline w150" style="display: none">
|
||||
<select name="province_id" data-toggle="next-select"
|
||||
data-refurl="/common/area?key=city&id={value}&url=search" data-next="#bd-hd-city">
|
||||
<option value="0">省份</option>
|
||||
<?php if ($provinces) {
|
||||
foreach ($provinces as $v) { ?>
|
||||
<option value="<?= $v['province_id'] ?>"
|
||||
<?= $v['province_id'] == $province_id ? 'selected' : '' ?>><?= $v['province_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select id="bd-hd-city" name="city_id" data-toggle="next-select"
|
||||
data-refurl="/common/area?key=county&id={value}" data-next="#bd-hd-county">
|
||||
<option value="0">城市</option>
|
||||
<?php if ($citys) {
|
||||
foreach ($citys as $v) { ?>
|
||||
<option value="<?= $v['city_id'] ?>"
|
||||
<?= $v['city_id'] == $city_id ? 'selected' : '' ?>><?= $v['city_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w150">
|
||||
<select id="bd-hd-county" name="county_id" data-toggle="next-select"
|
||||
data-refurl="/common/areas?id={value}" data-next="#bd-hd-area">
|
||||
<option value="0">行政区</option>
|
||||
<?php if ($countys) {
|
||||
foreach ($countys as $value) { ?>
|
||||
<option value="<?= $value['county_id'] ?>"
|
||||
<?= $value['county_id'] == $county_id ? 'selected' : '' ?>><?= $value['county_name'] ?></option>
|
||||
<?php }
|
||||
} ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group fl">
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
@@ -54,7 +93,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl" style="margin-bottom: 0px;">
|
||||
<div class="am-form-group fl ml10">
|
||||
<button type="submit" class="am-btn am-btn-success am-btn-sm w100">搜索</button>
|
||||
|
||||
@@ -19,12 +19,11 @@ class Aptinfo extends Wxapp{
|
||||
$this->check_mobile = array();//需要手机号
|
||||
$this->check_headimg =array();//授权微信信息
|
||||
$this->load->model('app/liche/app_liche_cms_model', 'cms_model');
|
||||
|
||||
$this->load->model("sys/sys_city_model");
|
||||
$this->load->model('sys/sys_area_model');
|
||||
}
|
||||
|
||||
protected function get(){
|
||||
$this->load->model("sys/sys_city_model");
|
||||
$this->load->model('sys/sys_area_model');
|
||||
|
||||
$city_code = $this->input_param('c_code');
|
||||
$cms_id = $this->input_param('cms_id');
|
||||
@@ -119,10 +118,13 @@ class Aptinfo extends Wxapp{
|
||||
|
||||
$uid = $this->session['uid'];
|
||||
$biz_id = $this->input_param('biz_id');
|
||||
$city_code = $this->input_param('city_id');
|
||||
$city_id = $this->input_param('city_id');
|
||||
$lat = $this->input_param('lat');
|
||||
$lng = $this->input_param('lng');
|
||||
$recommend_id = intval($this->input_param('cf_uid')); //来源用户id
|
||||
$cms_id = intval($this->input_param('cms_id')); //cmsid
|
||||
|
||||
$city_id && $city_row = $this->sys_area_model->get(['county_id' => $city_id],'id,county_id,city_id');
|
||||
$cms_row = $this->cms_model->get(['id'=>$cms_id]);
|
||||
if($cms_row){
|
||||
$cms_json = json_decode($cms_row['jsondata'],true);
|
||||
@@ -136,12 +138,11 @@ class Aptinfo extends Wxapp{
|
||||
];
|
||||
$brand_row && $update['brand_id'] = $brand_row['id'];
|
||||
$this->clues_model->update($update,['id'=>$row['id']]);
|
||||
throw new Exception('预约成功', API_CODE_SUCCESS);
|
||||
throw new Exception('预约成功,不需要重复报名', API_CODE_FAIL);
|
||||
}
|
||||
|
||||
$jsondata['info'] = [
|
||||
'biz_id' => $biz_id ? $biz_id : '',
|
||||
'city_code' => $city_code
|
||||
];
|
||||
$cf_platform = 'wxapp';
|
||||
$add_data = [
|
||||
@@ -159,6 +160,10 @@ class Aptinfo extends Wxapp{
|
||||
|
||||
$recommend_id && $add_data['recommend_id'] = $recommend_id;
|
||||
$brand_row['id'] && $add_data['brand_id'] = $brand_row['id'];
|
||||
$city_row && $add_data['city_id'] = $city_row['city_id'];
|
||||
$city_row && $add_data['county_id'] = $city_row['county_id'];
|
||||
$lat && $add_data['lat'] = $lat;
|
||||
$lng && $add_data['lng'] = $lng;
|
||||
$this->clues_model->add($add_data);
|
||||
throw new Exception('预约成功', API_CODE_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,10 @@ create table lc_receiver_clues (
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='线索池';
|
||||
alter table lc_receiver_clues add recommend_id int(10) not null default 0 comment '推荐用id' after cf_id;
|
||||
alter table lc_receiver_clues add en_time timestamp not null default '0000-00-00 00:00:00' comment '最后报名时间';
|
||||
alter table lc_receiver_clues add city_id int(10) unsigned NOT NULL DEFAULT '0' COMMENT '城市id' after app_id;
|
||||
alter table lc_receiver_clues add `county_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '区id' after city_id;
|
||||
alter table lc_receiver_clues add `lat` double(15,12) NOT NULL DEFAULT '0.000000000000' COMMENT '经度' after county_id;
|
||||
alter table lc_receiver_clues add `lng` double(15,12) NOT NULL DEFAULT '0.000000000000' COMMENT '纬度' after lat;
|
||||
|
||||
-- ----------------------------
|
||||
-- Title:线索操作日志表
|
||||
|
||||
Reference in New Issue
Block a user