Bladeren bron

software delete

wesley.chen 7 jaren geleden
bovenliggende
commit
665552a166

+ 3 - 0
app/Models/CutoffScoreModel.php

xqd xqd
@@ -1,6 +1,8 @@
 <?php
 namespace App\Models;
 use App\Models\BaseModel;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
 /**
  *  @description 分数线
  *  @author  system;
@@ -10,6 +12,7 @@ use App\Models\BaseModel;
  */
 class CutoffScoreModel extends BaseModel
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 3 - 0
app/Models/MajorInfoModel.php

xqd xqd
@@ -1,6 +1,8 @@
 <?php
 namespace App\Models;
 use App\Models\BaseModel;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
 /**
  *  @description 专业信息
  *  @author  system;
@@ -10,6 +12,7 @@ use App\Models\BaseModel;
  */
 class MajorInfoModel extends BaseModel
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 3 - 0
app/Models/PaidSettingModel.php

xqd xqd
@@ -1,6 +1,8 @@
 <?php
 namespace App\Models;
 use App\Models\BaseModel;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
 /**
  *  @description 付费设置
  *  @author  system;
@@ -10,6 +12,7 @@ use App\Models\BaseModel;
  */
 class PaidSettingModel extends BaseModel
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 3 - 0
app/Models/QueryInfoModel.php

xqd xqd
@@ -1,6 +1,8 @@
 <?php
 namespace App\Models;
 use App\Models\BaseModel;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
 /**
  *  @description 查询记录
  *  @author  system;
@@ -10,6 +12,7 @@ use App\Models\BaseModel;
  */
 class QueryInfoModel extends BaseModel
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 3 - 0
app/Models/StudentCountModel.php

xqd xqd
@@ -1,6 +1,8 @@
 <?php
 namespace App\Models;
 use App\Models\BaseModel;
+use Illuminate\Database\Eloquent\SoftDeletes;
+
 /**
  *  @description 人数统计
  *  @author  system;
@@ -10,6 +12,7 @@ use App\Models\BaseModel;
  */
 class StudentCountModel extends BaseModel
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 2 - 0
app/Models/UserInfoModel.php

xqd xqd
@@ -3,6 +3,7 @@
 namespace App\Models;
 
 use Illuminate\Foundation\Auth\User as Authenticatable;
+use Illuminate\Database\Eloquent\SoftDeletes;
 
 /**
  * @description 用户表
@@ -13,6 +14,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
  */
 class UserInfoModel extends Authenticatable
 {
+    use SoftDeletes;
     /**
      * 数据表名
      *

+ 4 - 3
app/Repositories/Cutoff/Criteria/MultiWhere.php

xqd
@@ -35,9 +35,10 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-          if(isset($this->search['updated_at']) && $this->search['updated_at']) {
-                                    $model = $model->where('updated_at',$this->search['updated_at']);
-                                 }
+        if(isset($this->search['keyword']) && $this->search['keyword']) {
+            $model = $model->where('year',$this->search['keyword'])
+                ->orWhere('province','like','%' . $this->search['keyword'] . '%');
+        }
 
          return $model;
     }

+ 7 - 3
app/Repositories/Major/Criteria/MultiWhere.php

xqd
@@ -35,9 +35,13 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-          if(isset($this->search['updated_at']) && $this->search['updated_at']) {
-                                    $model = $model->where('updated_at',$this->search['updated_at']);
-                                 }
+        if(isset($this->search['keyword']) && $this->search['keyword']) {
+            $model = $model->where('year',$this->search['keyword'])
+                ->orWhere('college','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('province','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('class','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('major','like','%' . $this->search['keyword'] . '%');
+        }
 
          return $model;
     }

+ 4 - 3
app/Repositories/Paid/Criteria/MultiWhere.php

xqd
@@ -35,9 +35,10 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-          if(isset($this->search['updated_at']) && $this->search['updated_at']) {
-                                    $model = $model->where('updated_at',$this->search['updated_at']);
-                                 }
+        if(isset($this->search['keyword']) && $this->search['keyword']) {
+            $model = $model->where('year',$this->search['keyword'])
+                ->orWhere('created_at','like','%' . $this->search['keyword'] . '%');
+        }
 
          return $model;
     }

+ 8 - 3
app/Repositories/Query/Criteria/MultiWhere.php

xqd
@@ -35,9 +35,14 @@ class MultiWhere extends Criteria {
     */
     public function apply($model, Repository $repository)
     {
-          if(isset($this->search['updated_at']) && $this->search['updated_at']) {
-                                    $model = $model->where('updated_at',$this->search['updated_at']);
-                                 }
+        if(isset($this->search['keyword']) && $this->search['keyword']) {
+            $model = $model->where('year',$this->search['keyword'])
+                ->orWhere('is_paid','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('cnumber','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('grade','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('created_at','like','%' . $this->search['keyword'] . '%')
+                ->orWhere('mobile','like','%' . $this->search['keyword'] . '%');
+        }
 
          return $model;
     }

File diff suppressed because it is too large
+ 418 - 417
public/base/css/style.min.css


+ 4 - 18
resources/views/admin/cutoff/score/view.blade.php

xqd xqd
@@ -4,14 +4,7 @@
 <div class="row">
     <div class="ibox-content">
         <div class="list-group">
-                                 
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading">ID</h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['id'] or ''}}</p>
-                                                 
-               </div>                     
+
                <div class="list-group-item">
                                                   
                    <h3 class="list-group-item-heading">年份</h3>
@@ -53,24 +46,17 @@
                                                    
                    <p class="list-group-item-text"> {{ $data['batch_three'] or ''}}</p>
                                                  
-               </div>                     
-               <div class="list-group-item">
-                                                  
-                   <h3 class="list-group-item-heading"></h3>
-                                                   
-                   <p class="list-group-item-text"> {{ $data['deleted_at'] or ''}}</p>
-                                                 
-               </div>                     
+               </div>
                <div class="list-group-item">
                                                   
-                   <h3 class="list-group-item-heading"></h3>
+                   <h3 class="list-group-item-heading">创建时间</h3>
                                                    
                    <p class="list-group-item-text"> {{ $data['created_at'] or ''}}</p>
                                                  
                </div>                     
                <div class="list-group-item">
                                                   
-                   <h3 class="list-group-item-heading"></h3>
+                   <h3 class="list-group-item-heading">更新时间</h3>
                                                    
                    <p class="list-group-item-text"> {{ $data['updated_at'] or ''}}</p>
                                                  

+ 1 - 36
resources/views/admin/query/info/index.blade.php

xqd xqd
@@ -17,7 +17,7 @@
 
                             <div class="col-sm-4">
                                 <div class="input-group">
-                                    <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
+                                    <input type="text" value="{{Request::get('keyword')}}" placeholder="考号/联系方式/查询时间"
                                            name="keyword" class="input-sm form-control">
                                     <span class="input-group-btn">
 									<button type="submit" class="btn btn-sm btn-primary">搜索</button>
@@ -30,58 +30,23 @@
                     <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
                         <thead>
                         <tr>
-
-                            <th class="sorting" data-sort="id"></th>
                             <th class="sorting" data-sort="is_paid"> 是否付费</th>
                             <th class="sorting" data-sort="cnumber"> 考号</th>
                             <th class="sorting" data-sort="grade"> 高考分数</th>
                             <th class="sorting" data-sort="mobile"> 联系方式</th>
                             <th class="sorting" data-sort="query_time">查询时间</th>
-                            <th class="sorting" data-sort="created_at">创建时间</th>
-                            <th width="22%">相关操作</th>
                         </tr>
                         </thead>
                         <tbody>
                         @if(isset($list))
                             @foreach($list as $key => $item)
                                 <tr>
-
-                                    <td>{{ $item->id }}</td>
                                     <td>{{ $item->is_paid }}</td>
                                     <td>{{ $item->cnumber }}</td>
                                     <td>{{ $item->grade }}</td>
                                     <td>{{ $item->mobile }}</td>
                                     <td>{{ $item->query_time }}</td>
-                                    <td>{{ $item->created_at }}</td>
-                                    <td>
-                                        <div class="btn-group">
-                                            <button data-toggle="dropdown"
-                                                    class="btn btn-warning btn-sm dropdown-toggle"
-                                                    aria-expanded="false">
-                                                操作 <span class="caret"></span>
-                                            </button>
-                                            <ul class="dropdown-menu">
-
-
-                                                @if(role('Query/Info/update'))
-                                                    <li><a href="{{ U('Query/Info/update',['id'=>$item->id])}}"
-                                                           class="font-bold">修改</a></li>
-                                                @endif
-
-                                                @if(role('Query/Info/destroy'))
-                                                    <li class="divider"></li>
-                                                    <li><a href="{{ U('Query/Info/destroy',['id'=>$item->id])}}"
-                                                           onclick="return confirm('你确定执行删除操作?');">删除</a></li>
-                                                @endif
 
-                                            </ul>
-                                        </div>
-                                        @if(role('Query/Info/view'))
-                                            <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('Query/Info/view',['id'=>$item->id])}}'});"
-                                                    class="btn btn-primary ">查看
-                                            </button>
-                                        @endif
-                                    </td>
                                 </tr>
                             @endforeach
                         @endif

+ 0 - 2
resources/views/admin/student/count/index.blade.php

xqd xqd
@@ -37,7 +37,6 @@
                         <thead>
                         <tr>
 
-                            <th class="sorting" data-sort="id"></th>
                             <th class="sorting" data-sort="year"> 年份</th>
                             <th class="sorting" data-sort="class"> 科类</th>
                             <th class="sorting" data-sort="grade"> 分数</th>
@@ -52,7 +51,6 @@
                             @foreach($list as $key => $item)
                                 <tr>
 
-                                    <td>{{ $item->id }}</td>
                                     <td>{{ $item->year }}</td>
                                     <td>{{ $item->class }}</td>
                                     <td>{{ $item->grade }}</td>

Some files were not shown because too many files changed in this diff