customer_tag_316

This commit is contained in:
dengbw
2022-03-16 10:22:25 +08:00
parent c617a99ffb
commit 8f19789a04
2 changed files with 36 additions and 70 deletions
+13 -18
View File
@@ -241,32 +241,27 @@ class Customer extends HD_Controller
public function get()
{
$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));
if (!$row) {
return $this->show_json(SYS_CODE_FAIL, '客户不存在!');
}
$if_driver = 1 == $row['if_driver'] ? '是' : '否';
$is_top = 1 == $row['is_top'] ? '是' : '否';
$car_json = json_decode($row['car_json'], true);
$version = $this->auto_attr_model->get(['id' => $car_json['v_id']], 'title');
$color = $this->auto_attr_model->get(['id' => $car_json['c_id']], 'title');
$side = $version ? $version['title'] : '';
$color = $color ? $color['title'] : '';
//$car_json = json_decode($row['car_json'], true);
//$version = $this->auto_attr_model->get(['id' => $car_json['v_id']], 'title');
//$color = $this->auto_attr_model->get(['id' => $car_json['c_id']], 'title');
//$side = $version ? $version['title'] : '';
//$color = $color ? $color['title'] : '';
//$row_brand = $this->auto_brand_model->get(array('id' => $row['brand_id']), 'name');
//$row_seriy = $this->auto_series_model->get(array('id' => $row['s_id']), 'name');
$row_biz = $this->biz_model->get(array('id' => $row['biz_id']));
$row_brand = $this->auto_brand_model->get(array('id' => $row['brand_id']), 'name');
$row_seriy = $this->auto_series_model->get(array('id' => $row['s_id']), 'name');
//获取销售员
$row_admin = $this->app_licheb_users_model->get(array('id' => $row['admin_id']), 'id,uname');
//操作日志
$rows_log = $this->customer_oplogs_model->select(array('customer_id' => $id), 'c_time desc', 0, 0);
//用户信息
if (SUPER_ADMIN == $this->role || 35 == $this->role) {
$mobile_sub = $row['mobile'];
@@ -315,12 +310,12 @@ class Customer extends HD_Controller
array('title' => '到店次数', 'value' => $row['a_num']),
array('title' => '试驾次数', 'value' => $row['t_num']),
),
array(
array('title' => '品牌', 'value' => $row_brand['name']),
array('title' => '车系', 'value' => $row_seriy['name']),
array('title' => '车型', 'value' => $side),
array('title' => '颜色', 'value' => $color),
),
// array(
// array('title' => '品牌', 'value' => $row_brand['name']),
// array('title' => '车系', 'value' => $row_seriy['name']),
// array('title' => '车型', 'value' => $side),
// array('title' => '颜色', 'value' => $color),
// ),
array(
array('title' => '分配时间', 'value' => $row['p_time'] != '0000-00-00 00:00:00' ? $row['p_time'] : ''),
array('title' => '最后联系', 'value' => $row['cont_time'] != '0000-00-00 00:00:00' ? $row['cont_time'] : ''),
+23 -52
View File
@@ -39,74 +39,46 @@
用户信息
</span>
<span style="float:right;margin-top:5px;">
<a href="javascript:" @click="editType(2)"><i class="fa fa-edit"></i></a>
<a href="javascript:" @click="editType(2)"><i class="fa fa-edit"></i></a>
</span>
</div>
<div class="am-panel-bd am-g">
<table width="100%" style="margin:10px 10px 10px 20px;">
<table width="100%" style="margin-left: 10px;margin-right: 10px;">
<tr>
<td class="table-td">
<div class="input-group">
<div class="input-group-addon">客户姓名:</div>
<input id="info_name" type="text" v-model="info.name" placeholder="请输入客户姓名">
</div>
</td>
<td class="table-td">
客户电话:{{info.mobile}}
</td>
<td class="table-td">
渠道来源:{{info.cf_title}}
</td>
<td class="table-td">
加入时间:{{info.c_time}}
<table>
<tr>
<td><span class="mr5">客户姓名:</span></td>
<td><input id="info_name" type="text" v-model="info.name" placeholder="请输入客户姓名"
style="width: 150px;"></td>
</tr>
</table>
</td>
<td class="table-td"><span class="mr5">客户电话:</span>{{info.mobile}}</td>
<td class="table-td"><span class="mr5">渠道来源:</span>{{info.cf_title}}</td>
<td class="table-td"><span class="mr5">加入时间:</span>{{info.c_time}}</td>
</tr>
<tr>
<td class="table-td"><span class="mr5">线下来源:</span>{{info.of_title}}</td>
<td class="table-td"><span class="mr5">线上来源:</span>{{info.cf_name}}</td>
<td class="table-td">
<div class="input-group">
<div class="input-group-addon">线下来源:</div>
{{info.of_title}}&nbsp
</div>
</td>
<td class="table-td">
线上来源:{{info.cf_name}}
</td>
<td class="table-td">
<template v-if="info.cf_user">分销来源:{{info.cf_user}}</template>
<template v-if="info.cf_user"><span class="mr5">分销来源:</span>{{info.cf_user}}</template>
</td>
<td class="table-td">
</td>
</tr>
<tr>
<tr v-if="edit_index==2">
<td>
<div class="am-form-inline" style="padding-right: 30px;padding-top: 10px;">
<div class="text-left pt10">
<div class="am-form-group ml10">
<a v-if="edit_index==2" href="javascript:void(0)"
<a href="javascript:void(0)"
class="am-btn am-btn-sm am-btn-success"
@click="saveEdit()">修改用户信息</a>
</div>
</div>
</div>
</td>
<td colspan="3">
<div class="am-form-inline" style="padding-right: 40px;padding-top: 10px;">
<div class="text-right pt10">
<div class="am-form-group ml10">
<a data-modal="/common/show_sms?id=<?= $info['id'] ?>&type=customer"
data-title="发送短信"
class="am-btn am-btn-sm am-btn-success">短信</a>
</div>
<div class="am-form-group ml10">
<a href="javascript:void(0);"
data-modal="/common/bind_mobile?id=<?= $info['id'] ?>&type=customer"
class="am-btn am-btn-sm am-btn-success" data-title="获取手机号">
拨打电话
</a>
</div>
</div>
</div>
</td>
</tr>
</table>
</div>
@@ -120,8 +92,7 @@
</span>
</div>
<div class="am-panel-bd am-g">
<table width="100%"
style="margin:10px 10px 10px 20px;">
<table width="100%" style="margin-left: 10px;margin-right: 10px;">
<tr v-for="(tr, i) in toshop">
<td class="table-td" v-for="(td, j) in tr"><span class="mr5">{{td.title}}:</span>{{td.value}}
</td>
@@ -141,14 +112,14 @@
</span>
</div>
<div class="am-panel-bd am-g">
<table width="100%" style="margin:10px 10px 10px 20px;">
<table width="100%" style="margin-left: 10px;margin-right: 10px;">
<template v-for="(v,i) in info.tag">
<tr>
<td class="table-td" style="width: 80%">
<table>
<tr v-if="v.type=='checkbox'">
<td>{{v.name}}</td>
<td style="padding-left: 30px;">
<td style="min-width: 80px">{{v.name}}:</td>
<td>
<template v-for="(v2,i2) in v.list">
<input type="checkbox" :value='v2.checked'
v-model="v2.checked"> {{v2.name}}&nbsp;
@@ -156,8 +127,8 @@
</td>
</tr>
<tr v-else>
<td>{{v.name}}</td>
<td style="padding-left: 30px;">
<td style="min-width: 80px">{{v.name}}:</td>
<td>
<template v-for="(v2,i2) in v.list">
<input type="radio" :value='v2.id'
v-model="v.value"> {{v2.name}}&nbsp;