customer add city_county about, orderv2 put_info add name about
This commit is contained in:
@@ -238,6 +238,8 @@ class Customer extends HD_Controller
|
||||
!$params['level'] && $params['level'] = '';
|
||||
!$params['of_id'] && $params['of_id'] = '';
|
||||
!$params['of2_id'] && $params['of2_id'] = '';
|
||||
!$params['city_id'] && $params['city_id'] = '';
|
||||
!$params['county_id'] && $params['county_id'] = '';
|
||||
!$params['biz_type'] && $params['biz_type'] = '';
|
||||
!$params['tags'] && $params['tags'] = '';
|
||||
!$params['tagsIntention'] && $params['tagsIntention'] = '';
|
||||
@@ -269,6 +271,12 @@ class Customer extends HD_Controller
|
||||
if ($params['of2_id']) {
|
||||
$where['of2_id'] = $params['of2_id'];
|
||||
}
|
||||
if ($params['city_id']) {
|
||||
$where['city_id'] = $params['city_id'];
|
||||
}
|
||||
if ($params['county_id']) {
|
||||
$where['county_id'] = $params['county_id'];
|
||||
}
|
||||
if (strlen($params['wxqy'])) {
|
||||
$where["wxqy"] = $params['wxqy'];
|
||||
} else {
|
||||
@@ -373,7 +381,8 @@ class Customer extends HD_Controller
|
||||
$id = $this->input->get('id');
|
||||
$this->load->model('auto/auto_series_model');
|
||||
$this->load->model('auto/auto_attr_model');
|
||||
$row = $this->customers_model->get(array('id' => $id));
|
||||
$select = '*, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name';
|
||||
$row = $this->customers_model->get(array('id' => $id), $select);
|
||||
if (!$row) {
|
||||
return $this->show_json(SYS_CODE_FAIL, '客户不存在!');
|
||||
}
|
||||
@@ -455,6 +464,7 @@ class Customer extends HD_Controller
|
||||
'tag_intention' => $tag_intention,
|
||||
'tag_group' => $tag_group,
|
||||
'biz_type' => $biz_type,
|
||||
'city_county' => $row['city_name'] ? $row['city_name'].$row['county_name'] : '-',
|
||||
);
|
||||
|
||||
//到店信息
|
||||
@@ -772,6 +782,8 @@ class Customer extends HD_Controller
|
||||
'mobile' => '手机',
|
||||
'level' => '客户等级',
|
||||
'status_name' => '客户状态',
|
||||
'city_name' => '所在城市',
|
||||
'county_name' => '所在地区',
|
||||
'to_send' => '是否改派',
|
||||
'c_time' => '建档时间',
|
||||
"dt_time" => "到店时间",
|
||||
@@ -792,7 +804,7 @@ class Customer extends HD_Controller
|
||||
$status_arr = $this->customers_model->get_status();
|
||||
unset($status_arr['-1']);
|
||||
if ($count) {
|
||||
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr";
|
||||
$fileds = "id, name, mobile, level, status, cs_biz_id, FROM_UNIXTIME(c_time) as c_time, if(dt_time>0, dt_time,'') as dt_time, if(order_time>0, order_time,'') as order_time, if(cont_time>0, cont_time,'') as cont_time, cf_title, cf_id, of_id, of2_id, (SELECT biz_name FROM `lc_biz` where id = `lc_receiver_customers`.biz_id) as biz_name, (SELECT uname FROM `lc_app_licheb_users` where id = `lc_receiver_customers`.admin_id) as admin_name, biz_id, admin_id, wxqy, wxgr, (select city_name from lc_area where city_id = lc_receiver_customers.city_id limit 1) as city_name, (select county_name from lc_area where county_id = lc_receiver_customers.county_id limit 1) as county_name";
|
||||
$rows = $this->customers_model->select($where, 'id desc', $page, $size, $fileds);
|
||||
foreach ($rows as $key => $val) {
|
||||
$of_title = '';
|
||||
@@ -811,6 +823,8 @@ class Customer extends HD_Controller
|
||||
'mobile' => $val['mobile'],
|
||||
'level' => $val['level'],
|
||||
'status_name' => $status_arr[$val['status']],
|
||||
'city_name' => $val['city_name'],
|
||||
'county_name' => $val['county_name'],
|
||||
'to_send' => $this->customers_model->csbizidAry($val['cs_biz_id'] ? $val['cs_biz_id'] : 0),
|
||||
'c_time' => $val['c_time'],
|
||||
'dt_time' => $val['dt_time'],
|
||||
|
||||
@@ -62,12 +62,19 @@
|
||||
<td class="table-td"><span class="mr5">微信好友:</span>{{info.wx_name}}</td>
|
||||
<td class="table-td"><span class="mr5">客户等级:</span>{{info.level}}</td>
|
||||
</tr>
|
||||
<tr v-if="info.to_send || info.cf_user">
|
||||
<tr>
|
||||
<td class="table-td"><span class="mr5">客户位置:</span>{{info.city_county}}</td>
|
||||
<td class="table-td" v-if="info.to_send"><span class="mr5">是否改派:</span>{{info.to_send}}</td>
|
||||
<td class="table-td" v-if="info.cf_user"><span class="mr5">分销来源:</span>{{info.cf_user}}</td>
|
||||
<td class="table-td" v-if="info.to_send && info.cf_user"></td>
|
||||
<td class="table-td" v-else colspan="2"></td>
|
||||
<td class="table-td" v-if="!info.to_send && !info.cf_user" colspan="2"></td>
|
||||
<td class="table-td" v-else-if="!info.to_send || !info.cf_user"></td>
|
||||
</tr>
|
||||
<!-- <tr v-if="info.to_send || info.cf_user">-->
|
||||
<!-- <td class="table-td" v-if="info.to_send"><span class="mr5">是否改派:</span>{{info.to_send}}</td>-->
|
||||
<!-- <td class="table-td" v-if="info.cf_user"><span class="mr5">分销来源:</span>{{info.cf_user}}</td>-->
|
||||
<!-- <td class="table-td" v-if="info.to_send && info.cf_user"></td>-->
|
||||
<!-- <td class="table-td" v-else colspan="2"></td>-->
|
||||
<!-- </tr>-->
|
||||
<tr>
|
||||
<td>
|
||||
<div class="am-form-inline" style="padding-right: 30px;padding-top: 10px;">
|
||||
|
||||
@@ -80,18 +80,31 @@
|
||||
<div class="am-form-group" style="margin-bottom: 0px;"></div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w80">客户来源:</label>
|
||||
<div class="am-form-group am-para-inline w120">
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="of_id" v-model="params.of_id">
|
||||
<option value="">请选择</option>
|
||||
<option :value="i" v-for="(v,i) in show_info.offlineSourcesAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-form-group am-para-inline w120">
|
||||
<div class="am-form-group am-para-inline w100">
|
||||
<select name="of2_id" v-model="params.of2_id">
|
||||
<option value="">请选择</option>
|
||||
<option :value="i" v-for="(v,i) in of2Ary">{{v}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="am-para-label w80">客户位置:</label>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="城市" name="city_id" v-model="params.city_id">
|
||||
<option value="">选择城市</option>
|
||||
<option :value="v.id" v-for="(v,i) in cityAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="am-para-inline w100">
|
||||
<select title="行政区" name="county_id" v-model="params.county_id">
|
||||
<option value="">选择行政区</option>
|
||||
<option :value="v.id" v-for="(v,i) in countyAry">{{v.name}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="am-form-group fl">
|
||||
<label class="am-para-label w90">门店类型:</label>
|
||||
@@ -412,6 +425,8 @@
|
||||
of2Ary: [],
|
||||
bizTypeAry: [],
|
||||
export_button: 0,
|
||||
cityAry: [],
|
||||
countyAry: [],
|
||||
},
|
||||
mounted: function () {
|
||||
var vm = this;
|
||||
@@ -638,6 +653,7 @@
|
||||
if (response.code == 1) {
|
||||
//vm.cityAry = response.data;
|
||||
vm.admins.cityAry = JSON.parse(JSON.stringify(response.data));
|
||||
vm.cityAry = JSON.parse(JSON.stringify(response.data));
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -649,6 +665,7 @@
|
||||
that.cfrom_id = 0;
|
||||
that.cfrom_id2 = 0;
|
||||
that.params.city_id_admin = '';
|
||||
that.params.city_id = '';
|
||||
that.params.of_id = '';
|
||||
that.params.of2_id = '';
|
||||
$('#id_tags').val('');
|
||||
@@ -715,6 +732,32 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.city_id': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
that.countyAry = [];
|
||||
that.county_id_admin = '';
|
||||
} else {
|
||||
if (nv.substring(0, 4) != that.params.county_id.substring(0, 4)) {
|
||||
that.params.county_id = '';
|
||||
}
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: '/common/area',
|
||||
dataType: 'json',
|
||||
data: {
|
||||
id: nv,
|
||||
key: 'county',
|
||||
type: 1
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.code == 1) {
|
||||
that.countyAry = response.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
'params.county_id_admin': function (nv, ov) {
|
||||
var that = this;
|
||||
if (nv == '') {
|
||||
|
||||
@@ -1110,7 +1110,6 @@ class CusorderV2 extends Wxapp
|
||||
$c_credit = $this->input_param('credit');
|
||||
$address = $this->input_param('address');
|
||||
$car_city_id = $this->input_param('c_city_id');
|
||||
$pro = $this->input_param('pro');
|
||||
|
||||
$row = $this->orders_model->get(['id' => $id]);
|
||||
if (!$row) {
|
||||
@@ -1127,12 +1126,23 @@ class CusorderV2 extends Wxapp
|
||||
$c_credit && $info_json['c_credit'] = $c_credit;
|
||||
$company && $info_json['c_company'] = $company;
|
||||
# 20230222 地址的值用身份证上面的地址
|
||||
/*if ($pro) {
|
||||
/*$pro = $this->input_param('pro');
|
||||
if ($pro) {
|
||||
$info_json['pro'] = $pro;
|
||||
$address = implode(' ', $pro) . $address;
|
||||
}*/
|
||||
$address && $info_json['c_address'] = $address;
|
||||
$car_city_id && $info_json['car_city_id'] = $car_city_id;
|
||||
|
||||
# 23-04-06: 购车人也需要加个修改功能
|
||||
#if(!$this->receiver_order_status_model->count(['o_id'=>$id,'pid_status'=>3,'status'=>1])){}
|
||||
$name = trim($this->input_param('name'));
|
||||
$mobile = trim($this->input_param('mobile'));
|
||||
$cardid = trim($this->input_param('cardid'));
|
||||
$name && $name != $row['name'] && $data['name'] = $name;
|
||||
$mobile && $mobile != $row['mobile'] && $data['mobile'] = $mobile;
|
||||
$cardid && $cardid != $info_json['c_cardid'] && $info_json['c_cardid'] = $cardid;
|
||||
|
||||
$info_json && $data['info_json'] = json_encode($info_json, JSON_UNESCAPED_UNICODE);
|
||||
$result = $this->orders_model->update($data, ['id' => $row['id']]);
|
||||
if ($result) {
|
||||
|
||||
Reference in New Issue
Block a user