瀏覽代碼

20250207 优化调整

贾小兵 2 月之前
父節點
當前提交
773e9a60c5

+ 32 - 20
application/admin/controller/student/Collection.php

@@ -529,20 +529,26 @@ class Collection extends Backend
             $unwin = $this->request->post('unwin/a');
             $arr = [];
             if(!empty($unwin)){
-                $xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
+                if(!empty($unwin['xx_id'])){
+                    $xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
+                }
                 $yy_name = Fault::where('fault_id','in',$unwin['yy_id'])->column('name');
-                $bw_name = Fault::where('fault_id',$unwin['bw_id'])->value('name');
-                $pc_name = Fault::where('fault_id',$unwin['pc_id'])->value('name');
+                if(!empty($unwin['bw_id'])){
+                    $bw_name = Fault::where('fault_id',$unwin['bw_id'])->value('name');
+                }
+                if(!empty($unwin['pc_id'])){
+                    $pc_name = Fault::where('fault_id',$unwin['pc_id'])->value('name');
+                }
                 $arr = [
                     'xh_id' => $unwin['xh_id'],
-                    'xx_id' => $unwin['xx_id'],
-                    'xx_name'=>$xx_name,
+                    'xx_id' => $unwin['xx_id']??'',
+                    'xx_name'=>$xx_name??'',
                     'yy_id' => implode(',',$unwin['yy_id']),
-                    'yy_name' => implode(',',$yy_name),
-                    'bw_id' => $unwin['bw_id'],
-                    'bw_name' => $bw_name,
-                    'pc_id' => $unwin['pc_id'],
-                    'pc_name' => $pc_name,
+                    'yy_name' => !empty($yy_name)? implode(',',$yy_name):'',
+                    'bw_id' => $unwin['bw_id']??'',
+                    'bw_name' => $bw_name??'',
+                    'pc_id' => $unwin['pc_id']??'',
+                    'pc_name' => $pc_namee??'',
                 ];
             }
             $other_report = !empty($row->other_report) ? json_decode($row->other_report,true) : [];
@@ -593,21 +599,27 @@ class Collection extends Backend
         if ($this->request->isPost()) {
             $unwin = $this->request->post('unwin/a');
             if(!empty($unwin)){
-                $xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
+                if(!empty($unwin['xx_id'])){
+                    $xx_name = Fault::where('fault_id',$unwin['xx_id'])->value('name');
+                }
                 $yy_name = Fault::where('fault_id','in',$unwin['yy_id'])->column('name');
-                $bw_name = Fault::where('fault_id',$unwin['bw_id'])->value('name');
-                $pc_name = Fault::where('fault_id',$unwin['pc_id'])->value('name');
+                if(!empty($unwin['bw_id'])){
+                    $bw_name = Fault::where('fault_id',$unwin['bw_id'])->value('name');
+                }
+                if(!empty($unwin['pc_id'])){
+                    $pc_name = Fault::where('fault_id',$unwin['pc_id'])->value('name');
+                }
                 $other_report = !empty($row->other_report) ? json_decode($row->other_report,true) : [];
                 foreach ($other_report as $k  =>$item){
                     if($k==$xh_id){
-                        $other_report[$k]['xx_id'] =$unwin['xx_id'];
-                        $other_report[$k]['xx_name'] =$xx_name;
+                        $other_report[$k]['xx_id'] =$unwin['xx_id']??'';
+                        $other_report[$k]['xx_name'] =$xx_name??'';
                         $other_report[$k]['yy_id'] = implode(',',$unwin['yy_id']);
-                        $other_report[$k]['yy_name'] =implode(',',$yy_name);
-                        $other_report[$k]['bw_id'] = $unwin['bw_id'];
-                        $other_report[$k]['bw_name'] =$bw_name;
-                        $other_report[$k]['pc_id'] =$unwin['pc_id'];
-                        $other_report[$k]['pc_name'] =$pc_name;
+                        $other_report[$k]['yy_name'] =!empty($yy_name)? implode(',',$yy_name):'';
+                        $other_report[$k]['bw_id'] = $unwin['bw_id']??'';
+                        $other_report[$k]['bw_name'] =$bw_name??'';
+                        $other_report[$k]['pc_id'] =$unwin['pc_id']??'';
+                        $other_report[$k]['pc_name'] =$pc_name??'';
                     }
                 }
                 $row->other_report = json_encode($other_report);

+ 4 - 0
application/admin/view/student/collection/addreport.html

@@ -19,6 +19,10 @@
         background-color: #CCE8EB;
         width: 100px;
     }
+    tbody td{
+        text-align: left;
+        padding-left:15px;
+    }
 </style>
 <form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
     <div class="col-lg-12">

+ 2 - 2
application/admin/view/student/collection/examing.html

@@ -128,9 +128,9 @@
                             </div>
                         </div>
                         <div class="form-group">
-                            <div class="col-xs-9 col-sm-9" style="margin-left:44%;margin-bottom:15px">
+                            <div class="col-xs-9 col-sm-9" style="margin-left:44%;margin-bottom:7%;margin-top:-4%">
                                 <button type="button" class="btn btn-success btn-replace" style="text-align: center;width: 13%;margin-top: 5%">
-                                    {:__('立即申请')}</button>
+                                    {:__('提交申请')}</button>
                             </div>
                         </div>
                     </div>

+ 1 - 1
application/admin/view/teacher/exams/persent.html

@@ -45,7 +45,7 @@
 
             <div id="" class="tab-content">
                 <div class="tab-pane fade active in" id="two">
-                    <div class="tableTitle" style="font-size: 16px;margin: 10px 0">考试列表</div>
+                    <div class="tableTitle" style="font-size: 16px;margin: 10px 0">坐席列表</div>
                     <div class="widget-body no-padding">
                         <div id="toolbar1" class="toolbar">
                             <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>

+ 3 - 3
public/assets/js/backend/teacher/exams.js

@@ -96,10 +96,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','editable'], function
                         //     operate: Config.groupIds !=8 ? 'in':false,
                         //     formatter: Table.api.formatter.search
                         // },
-                        {field: 'total_score', title: __('Total_score')},
+                        {field: 'total_score', title: __('Total_score'),operate:false},
                         // {field: 'deduction_total_score', title: __('Deduction_total_score')},
-                        {field: 'starttime', title: __('Start_time'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
-                        {field: 'endtime', title: __('End_time'), formatter: Table.api.formatter.datetime, operate: false, addclass: 'datetimerange', sortable: true},
+                        {field: 'starttime', title: __('考试时间'), formatter: Table.api.formatter.datetime, operate: 'RANGE', addclass: 'datetimerange', sortable: true},
+                        // {field: 'endtime', title: __('End_time'), formatter: Table.api.formatter.datetime, operate: false, addclass: 'datetimerange', sortable: true},
                         // {field: 'login_time', title: __('Login_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
                         // {field: 'logout_time', title: __('Logout_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
                         // {field: 'create_by', title: __('Create_by'), operate: 'LIKE'},