Просмотр исходного кода

Merge branch 'zengjun' of ssh://was.baoshi56.com:10022/var/git/bswas

LD 5 лет назад
Родитель
Сommit
e0a89f21a0

+ 3 - 1
app/Http/Controllers/RejectedController.php

@@ -489,7 +489,9 @@ class RejectedController extends Controller
             'owner_id' => $request->input('owner_id'),
             'data'=> $request->input('data'),
             'created_at_start' => $request->input('created_at_start'),
-            'created_at_end' => $request->input('created_at_end')
+            'created_at_end' => $request->input('created_at_end'),
+            'uncheck_amount' => $request->input('uncheck_amount'),
+            'not_in_storage' => $request->input('not_in_storage'),
         ];
         return $searchParams;
     }

+ 17 - 2
app/RejectedAnalyzeOwner.php

@@ -146,9 +146,24 @@ class RejectedAnalyzeOwner extends Model
         $sql .= ' select  distinct id_owner,0 bounce_amount,0 check_amount,count(1) in_storage_count,0 not_in_storage_count from rejected_bills  where is_loaded = 1 and deleted_at is null ';
         $sql .= $condition;
         $sql .= ') rao ';
+        $sql .= ' left join owners on owners.id = rao.id_owner and owners.deleted_at is null ';
+        $sql .= ' group by rao.id_owner';
+        $sql .= ' having owners.name is not null';
+        if(isset($array['uncheck_amount'])){
+            // 审核数为0
+            if($array['uncheck_amount'] == 0)$sql.=' and bounce_amount - check_amount in (0)  ';
+            // 审核数不为0
+            if($array['uncheck_amount'] == 1)$sql.=' and check_amount <> check_amount ';
+        }
+        if(isset($array['not_in_storage'])){
+            // 入库数为0
+
+            if($array['not_in_storage'] == 0)$sql.=' and not_in_storage_count in (0) ';
+            // 入库数不为0
+            if($array['not_in_storage'] == 1)$sql.=' and not_in_storage_count <> 0 ';
+        }
 
-        $sql .= ' left join owners on owners.id = rao.id_owner and owners.deleted_at is null';
-        $sql .= ' group by rao.id_owner having owners.name is not null order by bounce_amount desc';
+        $sql .= ' order by bounce_amount desc';
         return  $sql;
     }
 

+ 1 - 1
app/Services/BatchService.php

@@ -3,11 +3,11 @@
 namespace App\Services;
 
 use App\Batch;
+use App\Exceptions\ErrorException;
 use App\OracleActAllocationDetails;
 use App\Order;
 use App\OrderCommodity;
 use App\Owner;
-use ErrorException;
 use Exception;
 use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Http;

+ 4 - 0
resources/views/rejected/search/analyze.blade.php

@@ -81,11 +81,15 @@
             mounted:function(){
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
                 $('#list').removeClass('d-none');
+                let uncheck_check = [{name:'0',value:'未审核数为0'},{name:'1',value:'未审核数不为0'}];
+                let not_in_storage_check = [{name:'0',value:'未入库数为0'},{name:'1',value:'未入库数为不为0'}];
                 let data=[
                     [
                         {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
                         {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
                             placeholder:['货主','定位或多选货主'],data:this.owners},
+                        {name:'uncheck_amount',type:"select",data:uncheck_check,tip:'未审核数',placeholder:'未审核数'},
+                        {name:'not_in_storage',type:"select",data:not_in_storage_check,tip:'未入库数',placeholder:'未入库数'},
                     ],[
                         {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
                     ]

+ 2 - 2
resources/views/transport/discharge/task/_table.blade.php

@@ -23,13 +23,13 @@
                     <span class="badge badge-pill badge-secondary">未指定服务商</span>
                 </template>
                 <template v-else-if="dischargeTask.status===1">
-                    <span class="badge badge-pill badge-warning">任务未进行</span>
+                    <span class="badge badge-pill badge-warning">任务已指定</span>
                 </template>
                 <template v-else-if="dischargeTask.status===2">
                     <span class="badge badge-pill badge-success">进行中</span>
                 </template>
                 <template v-else-if="dischargeTask.status===3">
-                    <span class="badge badge-pill badge-light">完成</span>
+                    <span class="badge badge-pill badge-success">完成</span>
                 </template>
             </td>
             <td>@{{ dischargeTask.created_at }}</td>

+ 1 - 1
resources/views/transport/discharge/task/index.blade.php

@@ -66,7 +66,7 @@
                 status: [
                     {name: 0, value: '创建'},
                     {name: 1, value: '接单'},
-                    {name: 2, value: '作业中'},
+                    // {name: 2, value: '作业中'},
                     {name: 3, value: '完成'},
                 ],
                 isUpdate: false,