Jonlin 6 سال پیش
والد
کامیت
489218b60a
1فایلهای تغییر یافته به همراه10 افزوده شده و 14 حذف شده
  1. 10 14
      app/Models/MoneyBuyStr.php

+ 10 - 14
app/Models/MoneyBuyStr.php

@@ -51,29 +51,29 @@ class MoneyBuyStr extends BaseModel {
         for($c=0;$c<count($content);$c++) {
             if ($content[$c]->game_code == 'zq') {
                 for ($d = 0; $d < count($zqmatch); $d++) {
-                    if ($content[$c]->match_id == $zqmatch[$d]->id) {
+                    if ($content[$c]->match_id == $zqmatch[$d]->match_id) {
                         $content[$c]->match_status = $zqmatch[$d]->status;
                     }
                 }
             }
             if ($content[$c]->game_code == 'lq') {
                 for ($d = 0; $d < count($lqmatch); $d++) {
-                    if ($content[$c]->match_id == $zqmatch[$d]->id) {
-                        $content[$c]->match_status = $zqmatch[$d]->status;
+                    if ($content[$c]->match_id == $lqmatch[$d]->match_id) {
+                        $content[$c]->match_status = $lqmatch[$d]->status;
                     }
                 }
             }
             if ($content[$c]->game_code == 'wq') {
                 for ($d = 0; $d < count($wqmatch); $d++) {
-                    if ($content[$c]->match_id == $zqmatch[$d]->id) {
-                        $content[$c]->match_status = $zqmatch[$d]->status;
+                    if ($content[$c]->match_id == $wqmatch[$d]->match_id) {
+                        $content[$c]->match_status = $wqmatch[$d]->status;
                     }
                 }
             }
             if ($content[$c]->game_code == 'bq') {
                 for ($d = 0; $d < count($bqmatch); $d++) {
-                    if ($content[$c]->match_id == $zqmatch[$d]->id) {
-                        $content[$c]->match_status = $zqmatch[$d]->status;
+                    if ($content[$c]->match_id == $bqmatch[$d]->match_id) {
+                        $content[$c]->match_status = $bqmatch[$d]->status;
                     }
                 }
             }
@@ -142,21 +142,17 @@ class MoneyBuyStr extends BaseModel {
                 }
             }
 
-
             $data[$i]->settle_status = $data[$i]->settle_status;
-            $string = 1;
+
             if($data[$i]->status == 1){
                 if($data[$i]->settle_status == '未结算'){
                     $match_status = array();
                     for($j=0;$j<count($content);$j++){
                         if($data[$i]->batch_id == $content[$j]->batch_id){
-                            //$match_status[] = $content[$j]->match_status;
-                            if($content[$j]->match_status == 0 || $content[$j]->match_status == 1){
-                                $string = 2;
-                            }
+                            $match_status[] = $content[$j]->match_status;
                         }
                     }
-                    if($string == 2){
+                    if(is_array(0,$match_status) || is_array(1,$match_status)){
                         $data[$i]->settle_status = $data[$i]->settle_status.'<br><a class="layui-btn layui-btn-sm resettlement settlement" lay-event="detail" pid="id" lay-filter = "resettlement" uri="" href="javascript:void(0)" style="background-color: grey;"> 结算 </a>';
                     }else{
                         $data[$i]->settle_status = $data[$i]->settle_status.'<br><a class="layui-btn layui-btn-sm settlement" lay-event="detail" pid="id" lay-filter = "resettlement" uri="/admin/SoccerStringNoteList/settlement/?id=" href="javascript:settlement(\'/admin/SoccerStringNoteList/settlement/?id='.$data[$i]->id.'\');"> 结算 </a>';