浏览代码

结算相关处理

彭俊 6 年之前
父节点
当前提交
7b8cba0bd2

+ 4 - 4
app/Http/Controllers/Admin/SportswqController.php

@@ -31,10 +31,10 @@ class SportswqController extends Controller {
         $dt = \App\Lib\DataTable\DataTable::init();
         $dt->setDataSource('/admin/Sportswq/outcomeinfo');
         $dt->setLang('sportswq');
-        $dt->addColsFields('newtime', array('templet' => '#home_team', 'sort' => false, 'width' => 200));
-        $dt->addColsFields('home_team', array('templet' => '#home_team', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('guest_team', array('templet' => '#guest_team', 'sort' => false, 'width' => 80));
-        $dt->addColsFields('dsnum', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('newtime', array('templet' => '#newtime', 'sort' => false, 'width' => 200));
+        $dt->addColsFields('home_player_name', array('templet' => '#home_team', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('guest_player_name', array('templet' => '#guest_team', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('dsnum', array('templet' => '#dsnum', 'sort' => false, 'width' => 80));
         $dt->addColsFields('csnum', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
         $dt->addColsFields('match_score', array('templet' => '#home_rate', 'sort' => false, 'width' => 80));
         $dt->addColsFields('statusmatch', array('templet' => '#statusmatch', 'sort' => false, 'width' => 80));

+ 4 - 4
app/Models/Stwqresult.php

@@ -12,12 +12,12 @@ class Stwqresult extends Model
     function resultlist($list = 10, $page, $where = '')
     {
         if (is_array ($where) && count ($where) > 0) {
-            $data = $this->join('st_wq_league','st_wq_result.lg_id','=','st_wq_league.id')->join('st_zq_competition','st_zq_competition.id','=','st_wq_result.match_id')->select($this->table.'.id',$this->table.'.home_team',$this->table.'.guest_team',$this->table.'.match_id','st_wq_result.guest_team','st_wq_result.home_rate','st_wq_result.guest_rate','st_wq_result.first_score','st_wq_result.status','st_wq_result.last_score','st_wq_result.match_score','st_wq_result.match_winer','st_wq_result.update_time','st_zq_competition.match_time','st_wq_result.match_process',$this->table.'.home_score',$this->table.'.guest_score',$this->table.'.u_guest_score',$this->table.'.u_home_score',$this->table.'.start_time','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->where($where)->paginate ($list);
-        } else { 
-            $data = $this->join('st_wq_league','st_wq_result.lg_id','=','st_wq_league.id')->join('st_zq_competition','st_zq_competition.id','=','st_wq_result.match_id')->select($this->table.'.id',$this->table.'.home_team',$this->table.'.guest_team',$this->table.'.match_id','st_wq_result.guest_team','st_wq_result.home_rate','st_wq_result.guest_rate','st_wq_result.first_score','st_wq_result.status','st_wq_result.last_score','st_wq_result.match_score','st_wq_result.match_winer','st_wq_result.update_time','st_zq_competition.match_time','st_wq_result.match_process',$this->table.'.home_score',$this->table.'.guest_score',$this->table.'.u_guest_score',$this->table.'.u_home_score',$this->table.'.start_time','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->paginate ($list);
+            $data = $this->join('st_wq_league','st_wq_result.lg_id','=','st_wq_league.id')->join('st_wq_competition','st_wq_competition.id','=','st_wq_result.match_id')->select($this->table.'.id',$this->table.'.home_player_name',$this->table.'.guest_player_name',$this->table.'.match_id','st_wq_result.first_score_player','st_wq_result.status','st_wq_result.last_score_player','st_wq_result.match_score','st_wq_result.update_time','st_wq_competition.match_time','st_wq_result.match_process',$this->table.'.home_player_score',$this->table.'.guest_player_score',$this->table.'.start_time','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->where($where)->paginate ($list);
+        } else {   
+            $data = $this->join('st_wq_league','st_wq_result.lg_id','=','st_wq_league.id')->join('st_wq_competition','st_wq_competition.id','=','st_wq_result.match_id')->select($this->table.'.id',$this->table.'.home_player_name',$this->table.'.guest_player_name',$this->table.'.match_id','st_wq_result.first_score_player','st_wq_result.status','st_wq_result.last_score_player','st_wq_result.match_score','st_wq_result.update_time','st_wq_competition.match_time','st_wq_result.match_process',$this->table.'.home_player_score',$this->table.'.guest_player_score',$this->table.'.start_time','st_wq_league.name_chinese as saisname')->orderby('st_wq_result.id','desc')->paginate ($list); 
         }
 
-        return $data->toArray ();
+        return $data->toArray (); 
 
     }
 

+ 2 - 2
resources/lang/zh-cn/sportswq.php

@@ -4,8 +4,8 @@ return array(
     //网球赛事结果
     'id' => '赛事结果ID',
     'lg_id' => '联赛id',
-    'home_team' =>'主队名称',
-    'guest_team' => '客队名称',
+    'home_player_name' =>'主队队员名称',
+    'guest_player_name' => '客队队员名称',
     'home_rate' => '主队让球',
     'guest_rate' => '客队让球',
     'home_score' => '主队总进球数',

+ 13 - 0
resources/views/admin/Sportswq/outcome.blade.php

@@ -120,6 +120,19 @@
         height: 40px;
     }
 </style>
+    
+    <script type="text/html" id="newtime">
+      @{{#if(d.match_id!=null){ }}
+        <span>@{{ d.match_id}}</span>
+      @{{#} }}<br>
+      @{{#if(d.saisname!=null){ }}
+        <span>@{{ d.saisname}}</span>
+      @{{#} }}
+    </script>
+
+    <script type="text/html" id="dsnum">
+        <span><a href="/admin/SoccerNoteList/notelist?type=wq&match_id=@{{d.match_id}}">单式</a></span>
+    </script>
 
     <script type="text/html" id="statusmatch">
     @{{#if(d.status==0){ }}