彭俊 6 жил өмнө
parent
commit
b55a2c70c5
28 өөрчлөгдсөн 681 нэмэгдсэн , 140 устгасан
  1. 0 1
      app/Http/Controllers/Admin/SoccerNoteListController.php
  2. 15 10
      app/Http/Controllers/Admin/SoccerStringNoteListController.php
  3. 18 0
      app/Http/Controllers/Admin/SportsBaseController.php
  4. 18 0
      app/Http/Controllers/Admin/SportsBasketController.php
  5. 18 0
      app/Http/Controllers/Admin/SportsSoccerController.php
  6. 18 0
      app/Http/Controllers/Admin/SportsTennisController.php
  7. 133 2
      app/Http/Controllers/Admin/WagentController.php
  8. 2 2
      app/Models/MoneyBuyStr.php
  9. 23 0
      app/Models/Moneytransfer.php
  10. 7 7
      app/Models/SportsBase.php
  11. 7 7
      app/Models/SportsBasket.php
  12. 7 7
      app/Models/SportsSoccer.php
  13. 7 7
      app/Models/SportsTennis.php
  14. 1 1
      app/Models/Wagent.php
  15. 23 0
      app/Models/Wagentlog.php
  16. 0 0
      public/frame/layui/css/layui.css
  17. 1 0
      resources/lang/zh-cn/sportsbase.php
  18. 1 0
      resources/lang/zh-cn/sportstennis.php
  19. 23 1
      resources/lang/zh-cn/wagent.php
  20. 16 14
      resources/views/admin/wagent/edit.blade.php
  21. 7 1
      resources/views/admin/wagent/index.blade.php
  22. 141 0
      resources/views/admin/wagent/xxrecord.blade.php
  23. 131 0
      resources/views/admin/wagent/zjrecord.blade.php
  24. 11 15
      resources/views/sports/base_match.blade.php
  25. 11 15
      resources/views/sports/basket_match.blade.php
  26. 30 34
      resources/views/sports/soccer_match.blade.php
  27. 11 15
      resources/views/sports/tennis_match.blade.php
  28. 1 1
      resources/views/vip/layouts.blade.php

+ 0 - 1
app/Http/Controllers/Admin/SoccerNoteListController.php

@@ -164,7 +164,6 @@ class SoccerNoteListController extends Controller
      */
     function moneycount()
     {
-        //$type = 'zq';//单式注单
         $where = Request::has('where') ? Request::get('where') : '';
         $db = new \App\Models\SportsNoteList;
 

+ 15 - 10
app/Http/Controllers/Admin/SoccerStringNoteListController.php

@@ -103,9 +103,9 @@ class SoccerStringNoteListController extends Controller
         $dt->setDataSource('/admin/SoccerStringNoteList/detailinfo?id='.$id.'');
         $dt->setLang('sportsnotelist');
         $dt->addColsFields('match_id', array('templet' => '#userdetail', 'sort' => true, 'width' => 80));
-        $dt->addColsFields('home_guest', array('templet' => '#userdetail', 'sort' => false, 'width' => 200));
+        $dt->addColsFields('home_guest', array('templet' => '#userdetail', 'sort' => false, 'width' => 180));
         $dt->addColsFields('game_type', array('templet' => '#userdetail', 'sort' => false, 'width' => 90));
-        $dt->addColsFields('odds_code', array('templet' => '#userdetail', 'sort' => false, 'width' => 120));
+        $dt->addColsFields('odds_code', array('templet' => '#userdetail', 'sort' => false, 'width' => 180));
         $dt->addColsFields('condition', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
         $dt->addColsFields('odds', array('templet' => '#userdetail', 'sort' => false, 'width' => 80));
         $dt->enableCheckBox();
@@ -113,20 +113,12 @@ class SoccerStringNoteListController extends Controller
     }
     function detailinfo(Req $req) {
         $id = $req->id;
-
         //$match_id = Request::get('match_id') ? Request::get('match_id') : '';
 
-
         $newapp = new \App\Models\MoneyBuyStr();
         $data = $newapp->getdetailinfo($id);
-        //$data = $data->toArray();
 
-        //return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
         return \App\Lib\DataTable\DataTable::init()->toJson($data);
-
-        //return view('sports/sports_notelistdetail', $data);
-
-
     }
 
     /**
@@ -137,6 +129,19 @@ class SoccerStringNoteListController extends Controller
         if (intval($id) < 1) {
             return -1;
         }
+        $order = DB::table('money_buy_str')->where('id',$id)->first();
+        $money = $order->money;
+        $codes = DB::table('st_bet_str')->where('id',$order->bet_str_id)->first();
+        $bet_str_all = json_decode($codes->bet_str_all, true);
+        for($i=0;$i<count($bet_str_all);$i++){
+            $match_id = $bet_str_all[$i]['match_id'];
+            $odds_code = $bet_str_all[$i]['odds_code'];
+            $result = DB::table('st_zq_result')->where('match_id',$match_id)->get();
+            $odds = $bet_str_all[$i]['odds'];
+            $money = $money*$odds;
+        }
+        $money = $money-$order->money;
+        return $money;
 
 
     }

+ 18 - 0
app/Http/Controllers/Admin/SportsBaseController.php

@@ -17,6 +17,7 @@ class SportsBaseController extends Controller {
         $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
         $request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
         $request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
+        $request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
         $data = \App\Models\BaseLeague::select('id','lg_id','name_chinese')->get();
@@ -32,6 +33,7 @@ class SportsBaseController extends Controller {
 //        $dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
         $dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
         $dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
+        $dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
         $dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 150));
         //$arr[] = 'view';
         if (checkRriv('/admin/SportsBase/edit')) {
@@ -82,6 +84,22 @@ class SportsBaseController extends Controller {
         $data = $newapp->getinfo($list, $page, $where,$orwhere);
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
     }
+    /**
+     *设置是否为推荐赛事
+     */
+    function recommendmatch(Req $req) {
+        $id = $req->id;
+        $recommend = is_numeric($req->recommend) ? intval($req->recommend) : '';
+        if (empty($id) || !is_numeric($recommend)) {
+            return responseToJson(-2020100102);
+        }
+        $u_db = new \App\Models\SportsBase;
+        $data = array(
+            'recommend' => $recommend,
+        );
+        $res = $u_db->updateInfos($data, $id);
+        return responseToJson($res);
+    }
     /**
      *获取所有足球联赛信息
      */

+ 18 - 0
app/Http/Controllers/Admin/SportsBasketController.php

@@ -17,6 +17,7 @@ class SportsBasketController extends Controller {
 		$request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
 		$request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
 		$request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
+		$request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
 		$request['status'] = isset($req->status) ? trim($req->status) : '-1';
 		$request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
 		$data = \App\Models\BasketLeague::select('id','lg_id','name_chinese')->get();
@@ -32,6 +33,7 @@ class SportsBasketController extends Controller {
 //        $dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
 		$dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
 		$dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
+		$dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
 		$dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 150));
 		//$arr[] = 'view';
 		if (checkRriv('/admin/SportsBasket/edit')) {
@@ -82,6 +84,22 @@ class SportsBasketController extends Controller {
 		$data = $newapp->getinfo($list, $page, $where,$orwhere);
 		return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
 	}
+	/**
+	 *设置是否为推荐赛事
+	 */
+	function recommendmatch(Req $req) {
+		$id = $req->id;
+		$recommend = is_numeric($req->recommend) ? intval($req->recommend) : '';
+		if (empty($id) || !is_numeric($recommend)) {
+			return responseToJson(-2020100102);
+		}
+		$u_db = new \App\Models\SportsBasket;
+		$data = array(
+			'recommend' => $recommend,
+		);
+		$res = $u_db->updateInfos($data, $id);
+		return responseToJson($res);
+	}
 	/**
 	 *获取所有篮球联赛信息
 	 */

+ 18 - 0
app/Http/Controllers/Admin/SportsSoccerController.php

@@ -17,6 +17,7 @@ class SportsSoccerController extends Controller {
         $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
         $request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
         $request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
+        $request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
         $data = \App\Models\SoccerLeague::select('id','lg_id','name_chinese')->get();
@@ -32,6 +33,7 @@ class SportsSoccerController extends Controller {
 //        $dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
         $dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
         $dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
+        $dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
         $dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 150));
         //$arr[] = 'view';
         if (checkRriv('/admin/SportsSoccer/edit')) {
@@ -82,6 +84,22 @@ class SportsSoccerController extends Controller {
         $data = $newapp->getinfo($list, $page, $where,$orwhere);
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
     }
+    /**
+     *设置是否为推荐赛事
+     */
+    function recommendmatch(Req $req) {
+        $id = $req->id;
+        $recommend = is_numeric($req->recommend) ? intval($req->recommend) : '';
+        if (empty($id) || !is_numeric($recommend)) {
+            return responseToJson(-2020100102);
+        }
+        $u_db = new \App\Models\SportsSoccer;
+        $data = array(
+            'recommend' => $recommend,
+        );
+        $res = $u_db->updateInfos($data, $id);
+        return responseToJson($res);
+    }
     /**
      *获取所有足球联赛信息
      */

+ 18 - 0
app/Http/Controllers/Admin/SportsTennisController.php

@@ -17,6 +17,7 @@ class SportsTennisController extends Controller {
         $request['name_chinese'] = isset($req->name_chinese) ? trim($req->name_chinese) : '-1';
         $request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
         $request['match_date'] = isset($req->match_date) ? trim($req->match_date) : null;
+        $request['recommend'] = isset($req->recommend) ? trim($req->recommend) : '';
         $request['status'] = isset($req->status) ? trim($req->status) : '-1';
         $request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
         $data = \App\Models\TennisLeague::select('id','lg_id','name_chinese')->get();
@@ -32,6 +33,7 @@ class SportsTennisController extends Controller {
 //        $dt->addColsFields('guest_team', array('templet' => '#userdetail', 'sort' => false, 'width' => 130));
         $dt->addColsFields('match_date', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
         $dt->addColsFields('match_time', array('templet' => '#userdetail', 'sort' => true, 'width' => 130));
+        $dt->addColsFields('recommend', array('templet' => '#recommend', 'sort' => false, 'width' => 120,'align' => 'center'));
         $dt->addColsFields('status', array('templet' => '#userdetail', 'sort' => false, 'width' => 150));
         //$arr[] = 'view';
         if (checkRriv('/admin/SportsTennis/edit')) {
@@ -82,6 +84,22 @@ class SportsTennisController extends Controller {
         $data = $newapp->getinfo($list, $page, $where,$orwhere);
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
     }
+    /**
+     *设置是否为推荐赛事
+     */
+    function recommendmatch(Req $req) {
+        $id = $req->id;
+        $recommend = is_numeric($req->recommend) ? intval($req->recommend) : '';
+        if (empty($id) || !is_numeric($recommend)) {
+            return responseToJson(-2020100102);
+        }
+        $u_db = new \App\Models\SportsTennis;
+        $data = array(
+            'recommend' => $recommend,
+        );
+        $res = $u_db->updateInfos($data, $id);
+        return responseToJson($res);
+    }
     /**
      *获取所有足球联赛信息
      */

+ 133 - 2
app/Http/Controllers/Admin/WagentController.php

@@ -30,14 +30,101 @@ class WagentController extends Controller {
         $dt->addColsFields('create_time', array('templet' => '#totime', 'sort' => false, 'width' => 120));
         $dt->addColsFields('frozen_money', array('templet' => '#frozen_money', 'sort' => false, 'width' => 120));
         $dt->addColsFields('money', array('templet' => '#totime', 'sort' => false, 'width' => 80));
-        if (checkRriv('/admin/sportsfoot/edit')) {
+        $dt->addColsFields('zjrecord_xxrecord', array('templet' => '#zjrecord_xxrecord', 'sort' => false, 'width' => 180));
+        if (checkRriv('/admin/wagent/edit')) {
 			$arr[] = 'edit';
 		}
-		$dt->setToolBar($arr, array('width' => 200));
+		$dt->setToolBar($arr, array('width' => 100));
         $dt->enableCheckBox();
 		return view('admin.wagent/index', $dt->render($request));
 	}
 
+	//代理用户资金纪录
+	function zjrecord(Req $req){
+		$request=array();
+		$request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
+		$request['status'] = isset($req->status) ? trim($req->status) : '-1';
+		$request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
+		$request['star_time'] = isset($req->star_time) ? trim($req->star_time) :trans('status.default_time.seven_day') ;
+        $request['end_time'] = isset($req->end_time) ? trim($req->end_time) : trans('status.default_time.etime');
+
+        $dt = \App\Lib\DataTable\DataTable::init();
+        $dt->setDataSource('/admin/wagent/zjrecordinfo');
+        $dt->setLang('wagent');
+        $dt->addColsFields('agent_name', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('ordernumber', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('credit', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('agent_money_before', array('templet' => '#newtime', 'sort' => false, 'width' => 100));
+        $dt->addColsFields('agent_money_after', array('templet' => '#newtime', 'sort' => false, 'width' => 100));
+        $dt->enableCheckBox();
+		return view('admin.wagent/zjrecord', $dt->render($request));
+	}
+
+	function zjrecordinfo(){
+		$page = Request::has('page') ? Request::get('page') : '';
+		$list = Request::has('limit') ? Request::get('limit') : 10;
+		$home_team = Request::has('home_team') ? Request::get('home_team') : '';
+		$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
+		$star_time = Request::get('star_time') ? Request::get('star_time').' 00:00:00' : '';
+        $end_time = Request::get('end_time') ? Request::get('end_time').' 23:59:59' : '';
+		$where = array();
+		if (!empty($home_team)) {
+			if (empty($sureblur) || $sureblur == 'off') {
+				$where[] = array('wagent_log.agent_name', 'like', '%' . $home_team . '%');
+			} else {
+				$where[] = array('wagent_log.agent_name', '=', $home_team);
+			}
+		}
+
+		$newapp = new \App\Models\Wagentlog();
+        $data = $newapp->wagentloglist($list, $page, $where);
+        
+        return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
+	}
+
+	//代理用户客户资金纪录
+	function xxrecord(Req $req){
+		$request=array();
+		$request['home_team'] = isset($req->home_team) ? trim($req->home_team) : null;
+		$request['status'] = isset($req->status) ? trim($req->status) : '-1';
+		$request['sureblurs'] = isset($req->sureblurs) ? $req->sureblurs : 'on';
+		$request['star_time'] = isset($req->star_time) ? trim($req->star_time) :trans('status.default_time.seven_day') ;
+        $request['end_time'] = isset($req->end_time) ? trim($req->end_time) : trans('status.default_time.etime');
+        
+        $dt = \App\Lib\DataTable\DataTable::init();
+        $dt->setDataSource('/admin/wagent/xxrecordinfo');
+        $dt->setLang('wagent');
+        $dt->addColsFields('ordernumber', array('templet' => '#newtime', 'sort' => false, 'width' => 300));
+        $dt->addColsFields('tradeamount', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('blance', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('addtime', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->addColsFields('agent_name', array('templet' => '#newtime', 'sort' => false, 'width' => 80));
+        $dt->enableCheckBox();
+		return view('admin.wagent/xxrecord', $dt->render($request));
+	}
+
+	function xxrecordinfo(){
+		$page = Request::has('page') ? Request::get('page') : '';
+		$list = Request::has('limit') ? Request::get('limit') : 10;
+		$home_team = Request::has('home_team') ? Request::get('home_team') : '';
+		$sureblur = Request::has('sureblurs') ? Request::get('sureblurs') : 'off';
+		$star_time = Request::get('star_time') ? Request::get('star_time').' 00:00:00' : '';
+        $end_time = Request::get('end_time') ? Request::get('end_time').' 23:59:59' : '';
+		$where = array();
+		if (!empty($home_team)) {
+			if (empty($sureblur) || $sureblur == 'off') {
+				$where[] = array('money_transfer.agent_name', 'like', '%' . $home_team . '%');
+			} else {
+				$where[] = array('money_transfer.agent_name', '=', $home_team);
+			}
+		}
+
+		$newapp = new \App\Models\Moneytransfer();
+        $data = $newapp->moneytransferlist($list, $page, $where);
+        
+        return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
+	}
+
 	function info(){
 		$page = Request::has('page') ? Request::get('page') : '';
 		$list = Request::has('limit') ? Request::get('limit') : 10;
@@ -60,6 +147,50 @@ class WagentController extends Controller {
         return \App\Lib\DataTable\DataTable::init()->toJson($data['data'], $data['total']);
 	}
 
+	function edit(Req $req) {
+		$id = $req->id;
+		if (intval($id) < 1) {
+			return -1;
+		}
+		if (!$req->isMethod('post')) {
+
+			$data = \App\Models\Wagent::where('id', $id)->first();
+			if (!$data) {
+				return -2;
+			}
+			$data = $data->toArray();
+
+			return view('admin.wagent/edit', $data);
+		} else {
+			$newapp = new \App\Models\Wagentlog();
+			$model = \App\Models\Wagent::where('id', $id)->first();
+			$newapp->agent_money_before = $model['money'];//交易前金额
+			$upmoney = $req->input('upmoney');
+			$type = $req->input('type');
+
+			if($type==1){
+				$model->money = $model['money']+$upmoney;
+			}
+			if($type==2){
+				if($model['money']>=$upmoney){
+					$model->money = $model['money']-$upmoney;
+				}
+			}
+			$model->status = $req->input('status');
+			$model->save();
+
+			//资金纪录日志
+			$newapp->agent_name = $model['agent_name'];//代理名称
+			$newapp->account_identity = 0;//默认值
+			$newapp->ordernumber = 'ST'.date("Ymdhis").mt_rand(100000, 999999);//订单号
+			$newapp->credit = $upmoney;//改变金额
+			$newapp->agent_money_after = $model->money;//交易后金额
+			$newapp->uid = session('adminInfo.admin_id');//操作员id
+			$newapp->save();
+			return responseToJson(1);
+		}
+	}	
+
 	function add(Req $req) {
 		if (!$req->isMethod('post')) {
             $lange = trans('menu');

+ 2 - 2
app/Models/MoneyBuyStr.php

@@ -94,11 +94,11 @@ class MoneyBuyStr extends BaseModel {
     function getdetailinfo($id) {
         $res = $this->where('id',$id)->first();
         $data = DB::table('st_bet_str')->where('id',$res->bet_str_id)->first();
-        $codes = json_decode($data->bet_srt_all, true);
+        $codes = json_decode($data->bet_str_all, true);
 
         for($i=0;$i<count($codes);$i++){
             $codes[$i]['home_guest'] = $codes[$i]['home_team'].' VS '.$codes[$i]['guest_team'];
-            $oddscode = DB::table('st_odds_code')->where('odds_code',$codes[$i]['ganame'])->first();
+            $oddscode = DB::table('st_odds_code')->where('odds_code',$codes[$i]['odds_code'])->first();
             $codes[$i]['odds_code'] = $oddscode->odds_name;
             $type = DB::table('st_game_type')->where('game_code',$codes[$i]['ballId'])->first();
             $codes[$i]['game_type'] = $type->game_name;

+ 23 - 0
app/Models/Moneytransfer.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Models;
+use Illuminate\Support\Facades\DB;
+class Moneytransfer extends BaseModel
+{
+	protected $table = 'money_transfer';
+	public $timestamps = false;
+	
+    function moneytransferlist($list = 10, $page, $where = '')
+    {
+    	if (is_array ($where) && count ($where) > 0) { 
+    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->where($where)->paginate ($list); 
+    	}else{
+    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->paginate ($list); 
+    	}
+    	for ($i=0; $i < count($data); $i++) { 
+    		$data[$i]->auth_expire = date("Y-m-d",$data[$i]->auth_expire);
+    	}
+    	return $data->toArray (); 
+    }
+
+}

+ 7 - 7
app/Models/SportsBase.php

@@ -15,7 +15,7 @@ class SportsBase extends BaseModel {
     {
         if (is_array ($where) && count ($where) > 0) {
             $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
-                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status')
+                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
                 ->orderby('st_bq_competition.match_date','desc')
                 ->orderby('st_bq_competition.match_time','desc')
                 ->where($where)
@@ -23,7 +23,7 @@ class SportsBase extends BaseModel {
                 ->paginate ($list);
         } else {
             $data = $this->join('st_bq_league','st_bq_competition.lg_id','=','st_bq_league.lg_id')
-                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status')
+                ->select('st_bq_competition.id','st_bq_competition.match_id','st_bq_competition.lg_id','st_bq_league.name_chinese','st_bq_competition.home_team','st_bq_competition.guest_team','st_bq_competition.match_date','st_bq_competition.match_time','st_bq_competition.status','st_bq_competition.recommend')
                 ->orderby('st_bq_competition.match_date','desc')
                 ->orderby('st_bq_competition.match_time','desc')
                 ->paginate ($list);
@@ -34,21 +34,21 @@ class SportsBase extends BaseModel {
         for($i=0;$i<count($data);$i++){
             if($data[$i]->match_date < date('Y-m-d',time())){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+5400 <= strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }
             else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+5400){
                 $data[$i]->status = '1';
-                $this->where('id', $data[$i]->id)->update(['status' => 1]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
             else if($data[$i]->match_date > date('Y-m-d',time())){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
 
             if($data[$i]->status==0){

+ 7 - 7
app/Models/SportsBasket.php

@@ -15,7 +15,7 @@ class SportsBasket extends BaseModel {
     {
         if (is_array ($where) && count ($where) > 0) {
             $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
-                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status')
+                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
                 ->orderby('st_lq_competition.match_date','desc')
                 ->orderby('st_lq_competition.match_time','desc')
                 ->where($where)
@@ -23,7 +23,7 @@ class SportsBasket extends BaseModel {
                 ->paginate ($list);
         } else {
             $data = $this->join('st_lq_league','st_lq_competition.lg_id','=','st_lq_league.lg_id')
-                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status')
+                ->select('st_lq_competition.id','st_lq_competition.match_id','st_lq_competition.lg_id','st_lq_league.name_chinese','st_lq_competition.home_team','st_lq_competition.guest_team','st_lq_competition.match_date','st_lq_competition.match_time','st_lq_competition.status','st_lq_competition.recommend')
                 ->orderby('st_lq_competition.match_date','desc')
                 ->orderby('st_lq_competition.match_time','desc')
                 ->paginate ($list);
@@ -34,21 +34,21 @@ class SportsBasket extends BaseModel {
         for($i=0;$i<count($data);$i++){
             if($data[$i]->match_date < date('Y-m-d',time())){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+2400 <= strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }
             else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+2400){
                 $data[$i]->status = '1';
-                $this->where('id', $data[$i]->id)->update(['status' => 1]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
             else if($data[$i]->match_date > date('Y-m-d',time())){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
 
             if($data[$i]->status==0){

+ 7 - 7
app/Models/SportsSoccer.php

@@ -15,7 +15,7 @@ class SportsSoccer extends BaseModel {
     {
         if (is_array ($where) && count ($where) > 0) {
             $data = $this->join('st_zq_league','st_zq_competition.lg_id','=','st_zq_league.lg_id')
-                ->select('st_zq_competition.id','st_zq_competition.match_id','st_zq_competition.lg_id','st_zq_league.name_chinese','st_zq_competition.home_team','st_zq_competition.guest_team','st_zq_competition.match_date','st_zq_competition.match_time','st_zq_competition.status')
+                ->select('st_zq_competition.id','st_zq_competition.match_id','st_zq_competition.lg_id','st_zq_league.name_chinese','st_zq_competition.home_team','st_zq_competition.guest_team','st_zq_competition.match_date','st_zq_competition.match_time','st_zq_competition.status','st_zq_competition.recommend')
                 ->orderby('st_zq_competition.match_date','desc')
                 ->orderby('st_zq_competition.match_time','desc')
                 ->where($where)
@@ -23,7 +23,7 @@ class SportsSoccer extends BaseModel {
                 ->paginate ($list);
         } else {
             $data = $this->join('st_zq_league','st_zq_competition.lg_id','=','st_zq_league.lg_id')
-                ->select('st_zq_competition.id','st_zq_competition.match_id','st_zq_competition.lg_id','st_zq_league.name_chinese','st_zq_competition.home_team','st_zq_competition.guest_team','st_zq_competition.match_date','st_zq_competition.match_time','st_zq_competition.status')
+                ->select('st_zq_competition.id','st_zq_competition.match_id','st_zq_competition.lg_id','st_zq_league.name_chinese','st_zq_competition.home_team','st_zq_competition.guest_team','st_zq_competition.match_date','st_zq_competition.match_time','st_zq_competition.status','st_zq_competition.recommend')
                 ->orderby('st_zq_competition.match_date','desc')
                 ->orderby('st_zq_competition.match_time','desc')
                 ->paginate ($list);
@@ -34,21 +34,21 @@ class SportsSoccer extends BaseModel {
         for($i=0;$i<count($data);$i++){
             if($data[$i]->match_date < date('Y-m-d',time())){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+5400 <= strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }
             else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+5400){
                 $data[$i]->status = '1';
-                $this->where('id', $data[$i]->id)->update(['status' => 1]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
             else if($data[$i]->match_date > date('Y-m-d',time())){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
 
             if($data[$i]->status==0){

+ 7 - 7
app/Models/SportsTennis.php

@@ -15,7 +15,7 @@ class SportsTennis extends BaseModel {
     {
         if (is_array ($where) && count ($where) > 0) {
             $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
-                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status')
+                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
                 ->orderby('st_wq_competition.match_date','desc')
                 ->orderby('st_wq_competition.match_time','desc')
                 ->where($where)
@@ -23,7 +23,7 @@ class SportsTennis extends BaseModel {
                 ->paginate ($list);
         } else {
             $data = $this->join('st_wq_league','st_wq_competition.lg_id','=','st_wq_league.lg_id')
-                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status')
+                ->select('st_wq_competition.id','st_wq_competition.match_id','st_wq_competition.lg_id','st_wq_league.name_chinese','st_wq_competition.home_team','st_wq_competition.guest_team','st_wq_competition.match_date','st_wq_competition.match_time','st_wq_competition.status','st_wq_competition.recommend')
                 ->orderby('st_wq_competition.match_date','desc')
                 ->orderby('st_wq_competition.match_time','desc')
                 ->paginate ($list);
@@ -34,21 +34,21 @@ class SportsTennis extends BaseModel {
         for($i=0;$i<count($data);$i++){
             if($data[$i]->match_date < date('Y-m-d',time())){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time)+5400 <= strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '2';
-                $this->where('id', $data[$i]->id)->update(['status' => 2]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 2]);
             }
             else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) < strtotime(date('H:i:s',time())) && strtotime(date('H:i:s',time())) < strtotime($data[$i]->match_time)+5400){
                 $data[$i]->status = '1';
-                $this->where('id', $data[$i]->id)->update(['status' => 1]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 1]);
             }else if($data[$i]->match_date == date('Y-m-d',time()) && strtotime($data[$i]->match_time) > strtotime(date('H:i:s',time()))){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+               //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
             else if($data[$i]->match_date > date('Y-m-d',time())){
                 $data[$i]->status = '0';
-                $this->where('id', $data[$i]->id)->update(['status' => 0]);
+                //$this->where('id', $data[$i]->id)->update(['status' => 0]);
             }
 
             if($data[$i]->status==0){

+ 1 - 1
app/Models/Wagent.php

@@ -10,7 +10,7 @@ class Wagent extends BaseModel
     function wagentlist($list = 10, $page, $where = '')
     {
     	if (is_array ($where) && count ($where) > 0) { 
-    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->where($where)->paginate ($list);  
+    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->where($where)->paginate ($list); 
     	}else{
     		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->paginate ($list); 
     	}

+ 23 - 0
app/Models/Wagentlog.php

@@ -0,0 +1,23 @@
+<?php
+
+namespace App\Models;
+use Illuminate\Support\Facades\DB;
+class Wagentlog extends BaseModel
+{
+	protected $table = 'wagent_log';
+	public $timestamps = false;
+	
+    function wagentloglist($list = 10, $page, $where = '')
+    {
+    	if (is_array ($where) && count ($where) > 0) { 
+    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->where($where)->paginate ($list); 
+    	}else{
+    		$data = $this->select($this->table.'.*')->orderby($this->table.'.id','desc')->paginate ($list); 
+    	}
+    	for ($i=0; $i < count($data); $i++) { 
+    		$data[$i]->auth_expire = date("Y-m-d",$data[$i]->auth_expire);
+    	}
+    	return $data->toArray (); 
+    }
+
+}

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
public/frame/layui/css/layui.css


+ 1 - 0
resources/lang/zh-cn/sportsbase.php

@@ -10,6 +10,7 @@ return array(
     'match_date' => '赛事日期',
     'match_time' => '赛事时间',
     'status' => '赛事状态',
+    'recommend' => '是否推荐',
     'match_score' => '赛事比分',
     'search' => '搜索',
 

+ 1 - 0
resources/lang/zh-cn/sportstennis.php

@@ -10,6 +10,7 @@ return array(
     'match_date' => '赛事日期',
     'match_time' => '赛事时间',
     'status' => '赛事状态',
+    'recommend' => '是否推荐',
     'match_score' => '赛事比分',
     'search' => '搜索',
 

+ 23 - 1
resources/lang/zh-cn/wagent.php

@@ -17,6 +17,28 @@ return array(
     'sousuo' => '搜索',
     'star_time' => '时间起',
     'end_time' => '时间止',
-    'agent_key_secret' => 'key/secret'
+    'agent_key_secret' => 'key/secret',
+    'zjrecord_xxrecord' => '资金纪录/线下纪录',
+
+    //代理客户资金纪录
+    'datetime' => '时间',
+    'account_identity' => '用户identify值',
+    // 'ordernumber' => '交易内部id money_transfer->id',
+    'credit' => '交易额',
+    'agent_money_before' => '交易前余额',
+    'agent_money_after' => '交易后余额',
+
+    //代理客户线下资金纪录
+    'account_indent' => '转账人的identid',
+    'ordernumber' => '订单号',
+    'billno' => '代理商上传的订单号',
+    'tradeamount' => '转账额度',
+    'blance' => '用户余额',
+    'type' => 'IN代表转入  OUT转出',
+    'tradtype' => '交易类型:5表示存入,6表示支出,8表示转入,9表示转出',
+    'tfrom' => '0中心1ibc 2ag 3orient 5明升 6mg 7欧博',
+    'tto' => '0中心1ibc 2ag 3orient 5明升 6mg 7欧博',
+    'addtime' => '转账时间',
+    'agent_name' => '代理名称',
 
 );

+ 16 - 14
resources/views/admin/wagent/edit.blade.php

@@ -3,38 +3,40 @@
 <form class="layui-form" action="{{ url()->full() }}" id="submitForm" name="submitForm" method="post" eventType=eventAjaxForm>
 {!! csrf_field() !!}
   <div class="layui-form-item">
-    <label class="layui-form-label">主队名称</label>
+    <label class="layui-form-label">代理名称</label>
     <div class="layui-input-block">
-      <input type="text" name="home_team" required  lay-verify="required" placeholder="请输入主动名称" autocomplete="off" value="{{ isset($home_team)?$home_team:'' }}" class="layui-input">
+      <input type="text" name="" required  lay-verify="required" placeholder="" autocomplete="off" value="{{ isset($agent_name)?$agent_name:'' }}" class="layui-input" style="width:200px;" readonly="readonly">
     </div>
   </div>
   <div class="layui-form-item">
-    <label class="layui-form-label">客队名称</label>
+    <label class="layui-form-label">可用余额</label>
     <div class="layui-input-block">
-    <input type="text" name="guest_team"   lay-verify="" placeholder="请输入客队名称" autocomplete="off" class="layui-input"  value="{{ isset($guest_team)?$guest_team:'' }}" >
+    <input type="text" name=""   lay-verify="" placeholder="" autocomplete="off" class="layui-input" style="width:200px;" value="{{ isset($money)?$money:'' }}" readonly="readonly">
     </div>
   </div>
   <div class="layui-form-item">
-    <label class="layui-form-label">客队让球数</label>
-    <div class="layui-input-block">
-    <input type="text" name="home_rate"   lay-verify="" placeholder="请输入客队让球数" autocomplete="off" class="layui-input"  value="{{ isset($home_rate)?$home_rate:'' }}" >
-    </div>
+    <label class="layui-form-label">操 作:</label>
+        <div class="layui-input-block">
+            <input type="radio" name="type" value="1" title="加款" checked/>
+            <input type="radio" name="type" value="2" title="扣款">
+        </div>
   </div>
   <div class="layui-form-item">
-    <label class="layui-form-label">主队让球数</label>
+    <label class="layui-form-label">金 额:</label>
     <div class="layui-input-block">
-    <input type="text" name="guest_rate"   lay-verify="" placeholder="请输入主队让球数" autocomplete="off" class="layui-input"  value="{{ isset($guest_rate)?$guest_rate:'' }}" >
+    <input type="text" name="upmoney"   lay-verify="" placeholder="请输入金额" autocomplete="off" class="layui-input" style="width:200px;" value="" >
     </div>
   </div>
   <div class="layui-form-item">
-    <label class="layui-form-label">比赛状态:</label>
+    <label class="layui-form-label">状 态:</label>
         <div class="layui-input-block">
-            <input type="radio" name="status" value="1" title="进行中" @if($status==1) checked @endif >
-            <input type="radio" name="status" value="2" title="已结束" @if($status==2) checked @endif>
+            <input type="radio" name="status" value="1" title="正常" @if($status==1) checked @endif >
+            <input type="radio" name="status" value="2" title="禁用" @if($status==2) checked @endif>
+            <input type="radio" name="status" value="3" title="待启用" @if($status==3) checked @endif>
+            <input type="radio" name="status" value="4" title="停用" @if($status==4) checked @endif>
         </div>
   </div>
 
-
 @if(S('ACTION')!='view')
   <div class="layui-form-item">
     <div class="layui-input-block">

+ 7 - 1
resources/views/admin/wagent/index.blade.php

@@ -31,6 +31,12 @@
         <span>@{{ d.agent_secret}}</span>
       @{{#} }}
     </script>
+    
+    <script type="text/html" id="zjrecord_xxrecord">
+        <span><a href="/admin/wagent/zjrecord?home_team=@{{ d.agent_name}}">资金纪录</a></span>
+      <br>
+        <span><a href="/admin/wagent/xxrecord?home_team=@{{ d.agent_name}}">线下纪录</a></span>
+    </script>
 
     <script type="text/html" id="status">
         @if(checkRriv('/admin/wagent/index'))<input type="checkbox" name="status" id="uid" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
@@ -69,7 +75,7 @@
                         <a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
                         <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon">ဂ</i></a>
                         @if(checkRriv('/admin/wagent/add'))<a href="/admin/wagent/add" class="layui-btn layui-btn-sm ">添加</a>@endif
-                        @if(checkRriv('/admin/wagent/deleteoutcome'))<a href="javascript:delWin('/admin/wagent/deleteoutcome?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif
+                        <!-- @if(checkRriv('/admin/wagent/deleteoutcome'))<a href="javascript:delWin('/admin/wagent/deleteoutcome?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif -->
                     </div>
                 </div>
             </form>

+ 141 - 0
resources/views/admin/wagent/xxrecord.blade.php

@@ -0,0 +1,141 @@
+@extends('vip.layouts')
+@section('seo_title')
+    代理列表
+@endsection
+@section('content')
+    <style>
+        .layui-laydate-range {
+            width: auto;
+        }
+
+        .layui-form-switch em {
+            width: auto;
+        }
+
+        .layui-form-switch {
+            width: 44px;
+            line-height: 23px;
+        }
+
+        .layui-form-item .checkbox {
+            width: auto;
+        }
+    </style>
+
+    
+    <script type="text/html" id="agent_key_secret">
+      @{{#if(d.agent_key!=null){ }}
+        <span>@{{ d.agent_key}}</span>
+      @{{#} }}<br>
+      @{{#if(d.agent_secret!=null){ }}
+        <span>@{{ d.agent_secret}}</span>
+      @{{#} }}
+    </script>
+
+    <script type="text/html" id="status">
+        @if(checkRriv('/admin/wagent/index'))<input type="checkbox" name="status" id="uid" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    </script>
+
+    <div class="layui-row">
+        <div class="layui-col-xs12">
+            <form class="layui-form rewrite" eventType="eventForm"  action="">
+                <div class="layui-form-item">
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.sousuo') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="home_team" id="home_team" eventType="event-query"  value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input">
+                        </div>
+                        <div class="layui-input-inline checkbox">
+                            <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" @if(!isset($sureblurs) || $sureblurs=='on') checked @endif  class="layui-input" eventType=event-query>
+                            <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $sureblurs }}">
+                        </div>
+                    </div>
+
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.star_time') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="star_time" value="{{ $star_time }}" id="star_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.end_time') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="end_time"  value="{{$end_time}}" id="end_time" placeholder=" - " word-break: break-all; lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
+                        </div>
+                    </div>
+
+                    <div class="layui-inline">
+                        <a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
+                        <a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
+                        <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon">ဂ</i></a>
+                        @if(checkRriv('/admin/wagent/add'))<a href="/admin/wagent/add" class="layui-btn layui-btn-sm ">添加</a>@endif
+                        <!-- @if(checkRriv('/admin/wagent/deleteoutcome'))<a href="javascript:delWin('/admin/wagent/deleteoutcome?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif -->
+                    </div>
+                </div>
+            </form>
+        </div>
+    </div>
+    <script type="text/javascript">
+        $(function () {
+            $('body').on('click', 'a[eventtype="event-delete"]', function () {
+                var span = $(this).prev();
+                var id = span.attr('data-id');
+                // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
+            })
+            $('body').on('click','#form_sureblur~.layui-form-switch',function(){
+            	var sus = $('#form_sureblur').next().text();
+            	if(sus=='精确'){
+            		$('#form_sureblurs').val('on');
+            	}else{
+            		$('#form_sureblurs').val('off');
+            	}
+            })
+        })
+        
+	</script>
+@push('dataTableJS')
+/*var active = {
+    reload: function(){
+      //执行重载
+      table.reload('{{ $dataId }}', {
+        page: {
+          curr: 1 //重新从第 1 页开始
+        }
+        ,where: {
+            account:$("#form_account").val(),
+            register_ip:$('#form_register_ip').val(),
+            last_ip:$('#form_last_ip').val(),
+            register_url:$('#form_register_url').val(),
+            last_url:$('#form_last_url').val(),
+            regist_startime:$('#form_regist_startime').val(),
+            regist_endtime:$('#form_regist_endtime').val(),
+            statuss:$('#form_statuss').val(),
+            cash_small:$('#form_cash_small').val(),
+            cash_big:$('#form_cash_big').val(),
+            sureblur:$('.layui-form-switch').text(),
+        }
+      });
+    }
+  };
+$('.lay-btn-diy').on('click', function(){
+    var type = $(this).data('type');
+    active[type] ? active[type].call(this) : '';
+  });*/
+
+  //重置表单
+  $('.reset').on('click',function(){
+      $('input').val('');
+      $('#form_statuss').val('');
+      //var type = $(this).data('type');
+      //active[type] ? active[type].call(this) : '';
+  });
+  //刷新表单
+    $('.set').on('click',function(){
+    //var type = $(this).data('type');
+    //active[type] ? active[type].call(this) : '';
+    });
+
+@endpush
+
+    @include('vip.datatable')
+@endsection

+ 131 - 0
resources/views/admin/wagent/zjrecord.blade.php

@@ -0,0 +1,131 @@
+@extends('vip.layouts')
+@section('seo_title')
+    代理列表
+@endsection
+@section('content')
+    <style>
+        .layui-laydate-range {
+            width: auto;
+        }
+
+        .layui-form-switch em {
+            width: auto;
+        }
+
+        .layui-form-switch {
+            width: 44px;
+            line-height: 23px;
+        }
+
+        .layui-form-item .checkbox {
+            width: auto;
+        }
+    </style>
+
+    <script type="text/html" id="status">
+        @if(checkRriv('/admin/wagent/index'))<input type="checkbox" name="status" id="uid" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    </script>
+
+    <div class="layui-row">
+        <div class="layui-col-xs12">
+            <form class="layui-form rewrite" eventType="eventForm"  action="">
+                <div class="layui-form-item">
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.sousuo') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="home_team" id="home_team" eventType="event-query"  value="{{ $home_team }}" lay-verify="required" autocomplete="off" class="layui-input">
+                        </div>
+                        <div class="layui-input-inline checkbox">
+                            <input type="checkbox" name="sureblur" id="form_sureblur" lay-skin="switch" lay-text="精确|模糊" @if(!isset($sureblurs) || $sureblurs=='on') checked @endif  class="layui-input" eventType=event-query>
+                            <input type="hidden" name="sureblurs" id="form_sureblurs" lay-verify="required" autocomplete="off" class="layui-input" eventType=event-query  value="{{ $sureblurs }}">
+                        </div>
+                    </div>
+
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.star_time') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="star_time" value="{{ $star_time }}" id="star_time" placeholder=" - "  lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
+                        </div>
+                    </div>
+                    <div class="layui-inline">
+                        <label class="layui-form-label">{{ trans('wagent.end_time') }}</label>
+                        <div class="layui-input-inline">
+                            <input type="text" name="end_time"  value="{{$end_time}}" id="end_time" placeholder=" - " word-break: break-all; lay-verify="" autocomplete="off" class="layui-input test-item" eventType=event-query>
+                        </div>
+                    </div>
+
+                    <div class="layui-inline">
+                        <a class="layui-btn layui-btn-sm lay-btn-diy"   data-type="reload" eventType="event-query-submit" style="opacity: 1; pointer-events: auto;">提交</a>
+                        <a  class="layui-btn   layui-btn-sm layui-btn-normal reset" data-type="reload" style="opacity: 1; pointer-events: auto;">重置</a>
+                        <a class="layui-btn layui-btn-sm layui-btn-green set" data-type="reload" style="opacity: 1; pointer-events: auto;"><i class="layui-icon">ဂ</i></a>
+                        @if(checkRriv('/admin/wagent/add'))<a href="/admin/wagent/add" class="layui-btn layui-btn-sm ">添加</a>@endif
+                        <!-- @if(checkRriv('/admin/wagent/deleteoutcome'))<a href="javascript:delWin('/admin/wagent/deleteoutcome?id=');" class="layui-btn layui-btn-sm  layui-btn-danger">删除</a>@endif -->
+                    </div>
+                </div>
+            </form>
+        </div>
+    </div>
+    <script type="text/javascript">
+        $(function () {
+            $('body').on('click', 'a[eventtype="event-delete"]', function () {
+                var span = $(this).prev();
+                var id = span.attr('data-id');
+                // openWin('/admin/system/AddMenu','{{ trans("menu.menu_edit")}}','600px','500px',id);
+            })
+            $('body').on('click','#form_sureblur~.layui-form-switch',function(){
+            	var sus = $('#form_sureblur').next().text();
+            	if(sus=='精确'){
+            		$('#form_sureblurs').val('on');
+            	}else{
+            		$('#form_sureblurs').val('off');
+            	}
+            })
+        })
+        
+	</script>
+@push('dataTableJS')
+/*var active = {
+    reload: function(){
+      //执行重载
+      table.reload('{{ $dataId }}', {
+        page: {
+          curr: 1 //重新从第 1 页开始
+        }
+        ,where: {
+            account:$("#form_account").val(),
+            register_ip:$('#form_register_ip').val(),
+            last_ip:$('#form_last_ip').val(),
+            register_url:$('#form_register_url').val(),
+            last_url:$('#form_last_url').val(),
+            regist_startime:$('#form_regist_startime').val(),
+            regist_endtime:$('#form_regist_endtime').val(),
+            statuss:$('#form_statuss').val(),
+            cash_small:$('#form_cash_small').val(),
+            cash_big:$('#form_cash_big').val(),
+            sureblur:$('.layui-form-switch').text(),
+        }
+      });
+    }
+  };
+$('.lay-btn-diy').on('click', function(){
+    var type = $(this).data('type');
+    active[type] ? active[type].call(this) : '';
+  });*/
+
+  //重置表单
+  $('.reset').on('click',function(){
+      $('input').val('');
+      $('#form_statuss').val('');
+      //var type = $(this).data('type');
+      //active[type] ? active[type].call(this) : '';
+  });
+  //刷新表单
+    $('.set').on('click',function(){
+    //var type = $(this).data('type');
+    //active[type] ? active[type].call(this) : '';
+    });
+
+@endpush
+
+    @include('vip.datatable')
+@endsection

+ 11 - 15
resources/views/sports/base_match.blade.php

@@ -9,11 +9,11 @@
         }
 
         .layui-form-switch em {
-            width: auto;
+            width: 36px;
         }
 
         .layui-form-switch {
-            width: 44px;
+            width: 53px;
             line-height: 23px;
         }
 
@@ -29,8 +29,8 @@
         input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
     </style>
 
-    <script type="text/html" id="status">
-        @if(checkRriv('/admin/SportsBase/score'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    <script type="text/html" id="recommend">
+        @if(checkRriv('/admin/SportsBase/recommendmatch'))<input type="checkbox" name="recommend" value="@{{d.id}}" lay-skin="switch" lay-text="推荐|不推荐" lay-filter="openRecommend" @{{ d.recommend == '1' ? 'checked' : '' }}>@endif
     </script>
 
     <div class="layui-row">
@@ -137,17 +137,13 @@
     //    }
     //  };
 
-    //启用|禁用用户
-    form.on('switch(openStatus)', function(obj){
-    var status = 0;
+    //推荐|不推荐
+    form.on('switch(openRecommend)', function(obj){
+    var recommend = 0;
     if(obj.elem.checked==true){
-    status = 1;
+    recommend = 1;
     }
-    setcolumn('/admin/BankSet/UserStart',this.name,status,this.value,obj);
-    console.log(this.name);
-    console.log(status);
-    console.log(this.value);
-    console.log(obj);
+    setcolumn('/admin/SportsBase/recommendmatch',this.name,recommend,this.value,obj);
     //layer.tips(msg, obj.othis);
     });
 
@@ -161,10 +157,10 @@
     if(data.status!=1){
     if(value==1){
     obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
-    obj.othis[0].innerHTML='<em>开启</em><i></i>';
+    obj.othis[0].innerHTML='<em>推荐</em><i></i>';
     }else{
     obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
-    obj.othis[0].innerHTML='<em>禁用</em><i></i>';
+    obj.othis[0].innerHTML='<em>不推荐</em><i></i>';
     }
     }
     }

+ 11 - 15
resources/views/sports/basket_match.blade.php

@@ -9,11 +9,11 @@
         }
 
         .layui-form-switch em {
-            width: auto;
+            width: 36px;
         }
 
         .layui-form-switch {
-            width: 44px;
+            width: 53px;
             line-height: 23px;
         }
 
@@ -29,8 +29,8 @@
         input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
     </style>
 
-    <script type="text/html" id="status">
-        @if(checkRriv('/admin/SportsBasket/score'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    <script type="text/html" id="recommend">
+        @if(checkRriv('/admin/SportsBasket/recommendmatch'))<input type="checkbox" name="recommend" value="@{{d.id}}" lay-skin="switch" lay-text="推荐|不推荐" lay-filter="openRecommend" @{{ d.recommend == '1' ? 'checked' : '' }}>@endif
     </script>
 
     <div class="layui-row">
@@ -143,17 +143,13 @@
     //    }
     //  };
 
-    //启用|禁用用户
-    form.on('switch(openStatus)', function(obj){
-    var status = 0;
+    //推荐|不推荐
+    form.on('switch(openRecommend)', function(obj){
+    var recommend = 0;
     if(obj.elem.checked==true){
-    status = 1;
+    recommend = 1;
     }
-    setcolumn('/admin/BankSet/UserStart',this.name,status,this.value,obj);
-    console.log(this.name);
-    console.log(status);
-    console.log(this.value);
-    console.log(obj);
+    setcolumn('/admin/SportsBasket/recommendmatch',this.name,recommend,this.value,obj);
     //layer.tips(msg, obj.othis);
     });
 
@@ -167,10 +163,10 @@
     if(data.status!=1){
     if(value==1){
     obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
-    obj.othis[0].innerHTML='<em>开启</em><i></i>';
+    obj.othis[0].innerHTML='<em>推荐</em><i></i>';
     }else{
     obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
-    obj.othis[0].innerHTML='<em>禁用</em><i></i>';
+    obj.othis[0].innerHTML='<em>不推荐</em><i></i>';
     }
     }
     }

+ 30 - 34
resources/views/sports/soccer_match.blade.php

@@ -9,11 +9,11 @@
         }
 
         .layui-form-switch em {
-            width: auto;
+            width: 36px;
         }
 
         .layui-form-switch {
-            width: 44px;
+            width: 53px;
             line-height: 23px;
         }
 
@@ -29,8 +29,8 @@
         input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
     </style>
 
-    <script type="text/html" id="status">
-        @if(checkRriv('/admin/SportsSoccer/score'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    <script type="text/html" id="recommend">
+        @if(checkRriv('/admin/SportsSoccer/recommendmatch'))<input type="checkbox" name="recommend" value="@{{d.id}}" lay-skin="switch" lay-text="推荐|不推荐" lay-filter="openRecommend" @{{ d.recommend == '1' ? 'checked' : '' }}>@endif
     </script>
 
     <div class="layui-row">
@@ -137,38 +137,34 @@
     //    }
     //  };
 
-    //启用|禁用用户
-    form.on('switch(openStatus)', function(obj){
-    var status = 0;
-    if(obj.elem.checked==true){
-    status = 1;
-    }
-    setcolumn('/admin/BankSet/UserStart',this.name,status,this.value,obj);
-    console.log(this.name);
-    console.log(status);
-    console.log(this.value);
-    console.log(obj);
-    //layer.tips(msg, obj.othis);
+    //推荐|不推荐
+    form.on('switch(openRecommend)', function(obj){
+        var recommend = 0;
+        if(obj.elem.checked==true){
+            recommend = 1;
+        }
+        setcolumn('/admin/SportsSoccer/recommendmatch',this.name,recommend,this.value,obj);
+        //layer.tips(msg, obj.othis);
     });
 
-    function setcolumn(url,column,value,id,obj){
-    $.ajax({
-    url: url+'?'+column+'='+value+'&id='+id,
-    dataType: 'json',
-    type: 'get',
-    success:function(data){
-    layer.msg(data.msg);
-    if(data.status!=1){
-    if(value==1){
-    obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
-    obj.othis[0].innerHTML='<em>开启</em><i></i>';
-    }else{
-    obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
-    obj.othis[0].innerHTML='<em>禁用</em><i></i>';
-    }
-    }
-    }
-    });
+        function setcolumn(url,column,value,id,obj){
+        $.ajax({
+            url: url+'?'+column+'='+value+'&id='+id,
+            dataType: 'json',
+            type: 'get',
+            success:function(data){
+                layer.msg(data.msg);
+                if(data.status!=1){
+                    if(value==1){
+                        obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
+                        obj.othis[0].innerHTML='<em>推荐</em><i></i>';
+                        }else{
+                        obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
+                        obj.othis[0].innerHTML='<em>不推荐</em><i></i>';
+                    }
+                }
+            }
+        });
     }
 
     //$('.lay-btn-diy').on('click', function(){

+ 11 - 15
resources/views/sports/tennis_match.blade.php

@@ -9,11 +9,11 @@
         }
 
         .layui-form-switch em {
-            width: auto;
+            width: 36px;
         }
 
         .layui-form-switch {
-            width: 44px;
+            width: 53px;
             line-height: 23px;
         }
 
@@ -29,8 +29,8 @@
         input[type=date]::-webkit-inner-spin-button { visibility: hidden; }
     </style>
 
-    <script type="text/html" id="status">
-        @if(checkRriv('/admin/SportsTennis/score'))<input type="checkbox" name="status" value="@{{d.id}}" lay-skin="switch" lay-text="进行中|已结束" lay-filter="openStatus" @{{ d.status == '1' ? 'checked' : '' }}>@endif
+    <script type="text/html" id="recommend">
+        @if(checkRriv('/admin/SportsTennis/recommendmatch'))<input type="checkbox" name="recommend" value="@{{d.id}}" lay-skin="switch" lay-text="推荐|不推荐" lay-filter="openRecommend" @{{ d.recommend == '1' ? 'checked' : '' }}>@endif
     </script>
 
     <div class="layui-row">
@@ -137,17 +137,13 @@
     //    }
     //  };
 
-    //启用|禁用用户
-    form.on('switch(openStatus)', function(obj){
-    var status = 0;
+    //推荐|不推荐
+    form.on('switch(openRecommend)', function(obj){
+    var recommend = 0;
     if(obj.elem.checked==true){
-    status = 1;
+    recommend = 1;
     }
-    setcolumn('/admin/BankSet/UserStart',this.name,status,this.value,obj);
-    console.log(this.name);
-    console.log(status);
-    console.log(this.value);
-    console.log(obj);
+    setcolumn('/admin/SportsTennis/recommendmatch',this.name,recommend,this.value,obj);
     //layer.tips(msg, obj.othis);
     });
 
@@ -161,10 +157,10 @@
     if(data.status!=1){
     if(value==1){
     obj.othis[0].setAttribute("class", "layui-unselect layui-form-switch");
-    obj.othis[0].innerHTML='<em>开启</em><i></i>';
+    obj.othis[0].innerHTML='<em>推荐</em><i></i>';
     }else{
     obj.othis[0].setAttribute("class",'layui-unselect layui-form-switch layui-form-onswitch');
-    obj.othis[0].innerHTML='<em>禁用</em><i></i>';
+    obj.othis[0].innerHTML='<em>不推荐</em><i></i>';
     }
     }
     }

+ 1 - 1
resources/views/vip/layouts.blade.php

@@ -6,7 +6,7 @@
 	<title> @if(Request::has('seo_title')) {{ Request::get('seo_title') }} @else @yield('seo_title') @endif </title>
 	<meta name="renderer" content="webkit">
 	<meta name="csrf-token" content="{{ csrf_token() }}">
-	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">	
+	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
 	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
 	<!-- <link rel="icon" href="{{ asset('/favicon.icon') }}"> -->
 	<link rel="stylesheet" href="{{ asset('frame/layui/css/layui.css') }}" media="all">

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно