update autocomplete choose staff
This commit is contained in:
@@ -8,6 +8,7 @@ use app\models\CaptureLogsSearch;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
use yii\filters\VerbFilter;
|
||||
use app\models\ListManagement;
|
||||
|
||||
/**
|
||||
* CaptureLogsController implements the CRUD actions for CaptureLogs model.
|
||||
@@ -43,17 +44,17 @@ class CaptureLogsController extends Controller {
|
||||
$dataProvider->query->andWhere(["BETWEEN", "capture_logs.time", $f, $t]);
|
||||
$dataProvider->query->orderBy(["time" => SORT_DESC]);
|
||||
|
||||
$tempConfig = json_decode(file_get_contents("http://localhost:4004/ReadEngineConfig", false, stream_context_create([
|
||||
'http' => [
|
||||
'header' => "Content-Type: application/json",
|
||||
'method' => "POST"
|
||||
]
|
||||
])), true);
|
||||
$data = json_decode($tempConfig['data'], true);
|
||||
$last = \app\models\ListManagement::find()->orderBy(['id' => SORT_DESC])->limit(1)->one();
|
||||
if (!is_object($last))
|
||||
$last = (object) ['id' => 0];
|
||||
$idAuto = $data['data']['box_id'] . "_" . ($last->id + 1);
|
||||
// $tempConfig = json_decode(file_get_contents("http://localhost:4004/ReadEngineConfig", false, stream_context_create([
|
||||
// 'http' => [
|
||||
// 'header' => "Content-Type: application/json",
|
||||
// 'method' => "POST"
|
||||
// ]
|
||||
// ])), true);
|
||||
// $data = json_decode($tempConfig['data'], true);
|
||||
// $last = \app\models\ListManagement::find()->orderBy(['id' => SORT_DESC])->limit(1)->one();
|
||||
// if (!is_object($last))
|
||||
// $last = (object) ['id' => 0];
|
||||
// $idAuto = $data['data']['box_id'] . "_" . ($last->id + 1);
|
||||
|
||||
return $this->render('index', [
|
||||
'searchModel' => $searchModel,
|
||||
@@ -61,7 +62,8 @@ class CaptureLogsController extends Controller {
|
||||
'statusArray' => CaptureLogs::$statusArray,
|
||||
'f' => $f,
|
||||
't' => $t,
|
||||
'idAuto' => $idAuto
|
||||
// 'idAuto' => $idAuto,
|
||||
"staffArray" => ListManagement::staffArray()
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user