This commit is contained in:
xiaoyu
2024-11-28 11:45:16 +08:00
parent 03d3b2549b
commit fabd4da672
4 changed files with 44 additions and 36 deletions
+22
View File
@@ -1159,4 +1159,26 @@ class Common extends CI_Controller
return $this->show_json(SYS_CODE_SUCCESS);
}
public function auto_search(){
$name = $this->input->get('name');
$lists = [];
if($name){
$where = array(
"name like '%{$name}%'" => null,
"status" => 1
);
$this->load->model('auto/auto_brand_model', 'mdAutoBrand');
$res = $this->mdAutoBrand->select($where, '', 0, 0, 'id,name');
foreach ($res as $value) {
$lists[] = array('id' => $value['id'], 'name' => $value['name']);
}
}
$this->data = $lists;
return $this->show_json(SYS_CODE_SUCCESS);
}
}
+6 -11
View File
@@ -65,7 +65,6 @@ class Report extends HD_Controller
$indexs = [
'biz_name' => '车卖场',
'work_per' => '今日开工率',
'word_month' => '本月平均开工数',
'cust_new' => '今日新增线索数',
'cust_month' => '本月线索总数',
'cust_visit' => '今日新增跟进数',
@@ -73,8 +72,8 @@ class Report extends HD_Controller
'order_new' => '今日订单新增数',
'order_month' => '本月订单总数',
"order_finish" => "本月订单信息完整数",
"cust_delay" => "今日线索逾期数",
"cust_delay_month" => "本月线索逾期数",
// "cust_delay" => "今日线索逾期数",
// "cust_delay_month" => "本月线索逾期数",
"order_wrong" => "今日订单未达T+1",
"order_wrong_month" => "本月订单未达T+1",
"order_early" => "今日开票早与订单时间数",
@@ -99,9 +98,6 @@ class Report extends HD_Controller
$sales = $this->app_licheb_users_model->count(array('group_id in (1,2)' => null, 'biz_id' => $v['id'], 'status' => 1));
$works = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 0, 'sub_type' => 0, 'score >' => 0));
//本月平均开工数
$work_month = $this->receiver_score_log_model->count(array('MONTH(day)' => $month, 'biz_id' => $v['id'], 'type' => 0, 'sub_type' => 0, 'score >' => 0));
//今日新增线索数
$cust_new = $this->receiver_customers_model->count(array('biz_id' => $v['id'], 'DATE(p_time)' => $day, 'of_id' => 3));
@@ -140,10 +136,10 @@ class Report extends HD_Controller
}
//今日线索逾期数
$cust_delay = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 3, 'sub_type' => 3, 'target_id >' => 0));
//$cust_delay = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 3, 'sub_type' => 3, 'target_id >' => 0));
//本月线索逾期数
$cust_delay_month = $this->receiver_score_log_model->count(array('MONTH(day)' => $month, 'biz_id' => $v['id'], 'type' => 3, 'sub_type' => 3, 'target_id >' => 0));
//$cust_delay_month = $this->receiver_score_log_model->count(array('MONTH(day)' => $month, 'biz_id' => $v['id'], 'type' => 3, 'sub_type' => 3, 'target_id >' => 0));
//今日订单未达T+1
$order_wrong = $this->receiver_score_log_model->count(array('day' => $day, 'biz_id' => $v['id'], 'type' => 3, 'sub_type' => 2, 'target_id >' => 0), 'target_id');
@@ -175,7 +171,6 @@ class Report extends HD_Controller
$data[] = array(
'biz_name' => $v['biz_name'],
'work_per' => number_format($works/$sales, 2) * 100 .'%',
'work_month' => number_format($work_month/$month, 1),
'cust_new' => $cust_new,
'cust_month' => $cust_month,
'cust_visit' => $cust_visit,
@@ -183,8 +178,8 @@ class Report extends HD_Controller
'order_new' => count($order_new),
'order_month' => $order_month,
'order_finish' => $order_finish,
'cust_delay' => $cust_delay,
'cust_delay_month' => $cust_delay_month,
// 'cust_delay' => $cust_delay,
// 'cust_delay_month' => $cust_delay_month,
'order_wrong' => $order_wrong,
'order_wrong_month' => $order_wrong_month,
'order_early' => $order_early,
+16 -24
View File
@@ -1,17 +1,6 @@
<form class="am-form am-form-horizontal ptb20 pr20 mt10" data-auto="true" method="post"
style="padding-top: 10px;padding-bottom: 10px;"
action="" id="edit-form">
<div class="am-form-group">
<label class="am-para-label">输入框:</label>
<div class="am-para-input am-dropdown" data-am-dropdown>
<input type="text" v-model="inputValue" @input="handleInput">
<ul class="am-dropdown-content" :style="'display:'+[showSelect?'block':'none']">
<li v-for="item in inputSelect">
<a href="javascript:;" @click="selectInput(item)">{{item.name}}</a>
</li>
</ul>
</div>
</div>
<div class="am-form-group">
<label class="am-para-label">姓名:</label>
<div class="am-para-input w150">
@@ -89,12 +78,15 @@
</div>
<div class="am-form-group">
<label class="am-para-label">关注车型:</label>
<div class="am-para-inline w120">
<select name="brand_id" v-model="info.brand_id">
<option :value="v.id" v-for="(v,i) in brandAry">{{v.name}}</option>
</select>
<div class="am-para-inline w160">
<input type="text" v-model="inputValue" @input="handleInput">
<ul class="am-dropdown-content" :style="'display:'+[showSelect?'block':'none']">
<li v-for="item in inputSelect">
<a href="javascript:;" @click="selectInput(item)">{{item.name}}</a>
</li>
</ul>
</div>
<div class="am-para-inline w120">
<div class="am-para-inline w160">
<select name="series_id" v-model="info.series_id">
<option :value="v.id" v-for="(v,i) in seryAry">{{v.name}}</option>
</select>
@@ -132,11 +124,7 @@
action: "",
inputValue: "",
showSelect: false,
inputSelect: [
{"id": 1, "name": "test"},
{"id": 2, "name": "test2"},
{"id": 3, "name": "test3"}
]
inputSelect: []
},
mounted: function () {
this.init_provinces();
@@ -146,8 +134,8 @@
this.info = <?=json_encode($info, JSON_UNESCAPED_UNICODE)?>;
this.cfromAry = <?=json_encode($cfromAry, JSON_UNESCAPED_UNICODE)?>;
this.action = "<?=$action?>";
this.init_brands();
this.get_series();
// this.init_brands();
// this.get_series();
},
methods: {
selectInput: function (item){
@@ -158,6 +146,10 @@
handleInput: function (event) {
console.log('输入值:', this.inputValue);
// 请求接口
$.get('/common/auto_search', {'name': this.inputValue}, function (response) {
this.inputSelect = response.data;
})
// this.inputSelect = []
if(this.inputSelect && this.inputSelect.length>0){
this.showSelect = true
@@ -260,7 +252,7 @@
watch: {
'info.brand_id': function (nv, ov) {
if (nv !== '') {
this.get_series()
//this.get_series()
}
},
-1
View File
@@ -7873,7 +7873,6 @@ img.am-thumbnail,
outline: 0; }
.am-dropdown-content {
position: absolute;
top: 100%;
left: 0;
z-index: 1020;