在我的通话功能中,添加只显示用户自己信息标志

dev
曾超新 5 years ago
parent 5bae32ec51
commit d6fc443bf7
  1. 15
      frontend/controllers/PhoneCenterController.php
  2. 3
      frontend/views/phone-center/call-records.php
  3. 3
      frontend/views/phone-center/usercall-index.php

@ -48,7 +48,12 @@ class PhoneCenterController extends BaseController
public $layout = 'blue-main'; public $layout = 'blue-main';
public function actionCallRecords() { public function actionCallRecords() {
return $this->render('call-records'); $request = Yii::$app->request;
$company_id = $request->get('company_id',0);
return $this->render('call-records', [
'company_id' => $company_id
]);
} }
public function actionCallRecordsJson(){ public function actionCallRecordsJson(){
Yii::$app->response->format = Response::FORMAT_JSON; Yii::$app->response->format = Response::FORMAT_JSON;
@ -500,7 +505,11 @@ public function actionDownload(){
} }
public function actionUsercallIndex() { public function actionUsercallIndex() {
return $this->render('usercall-index'); $request = Yii::$app->request;
$company_id = $request->get('company_id',0);
return $this->render('usercall-index',[
'company_id' => $company_id
]);
} }
public function actionUsercallIndexJson(){ public function actionUsercallIndexJson(){
Yii::$app->response->format = Response::FORMAT_JSON; Yii::$app->response->format = Response::FORMAT_JSON;
@ -541,7 +550,7 @@ public function actionDownload(){
} }
$total = $query->count(); $total = $query->count();
$query = $query->offset($offset)->limit($limit); $query = $query->offset($offset)->limit($limit);
$items = $query->all(); $items = $query->all();

@ -17,10 +17,13 @@ use \common\libs\MyLib;
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();"> <form role="form" class="form-inline" onsubmit="return search();">
<input type="hidden" name="company_id" value="<?=$company_id?>">
<?php if($company_id == 3) { ?>
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="username">工号</label> <label for="username">工号</label>
<input type="text" id="username" name="username" class="form-control"> <input type="text" id="username" name="username" class="form-control">
</div> </div>
<?php } ?>
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker">通话时间</label> <label for="datepicker">通话时间</label>
<div class="input-group" id="datepicker"> <div class="input-group" id="datepicker">

@ -17,10 +17,13 @@ use \common\libs\MyLib;
</div> </div>
<div class="ibox-content"> <div class="ibox-content">
<form role="form" class="form-inline" onsubmit="return search();"> <form role="form" class="form-inline" onsubmit="return search();">
<input type="hidden" name="company_id" id="company_id" value="<?=$company_id?>">
<?php if($company_id == 3) { ?>
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="username">坐席人员</label> <label for="username">坐席人员</label>
<input type="text" id="caller" name="caller" class="form-control"> <input type="text" id="caller" name="caller" class="form-control">
</div> </div>
<?php } ?>
<div class="form-group" style="margin-bottom: 8px;"> <div class="form-group" style="margin-bottom: 8px;">
<label for="datepicker">通话时间</label> <label for="datepicker">通话时间</label>
<div class="input-group" id="datepicker"> <div class="input-group" id="datepicker">

Loading…
Cancel
Save