Kaynağa Gözat

Merge branch 'zzd'

# Conflicts:
#	app/Http/Controllers/TestController.php
LD 5 yıl önce
ebeveyn
işleme
0a8a7b9d66

+ 0 - 1
app/Http/Controllers/RejectedBillItemController.php

@@ -231,7 +231,6 @@ class RejectedBillItemController extends Controller
             return true;
         }
         $rejected=new Rejected();
-        $this->log(__METHOD__,'找不到表','234行');
         $rejected->fill($rejectedBill->toArray());
         $goodses=[];
         $items->each(function(RejectedBillItem $item)use(&$goodses){

+ 2 - 0
app/Http/Controllers/RejectedController.php

@@ -388,6 +388,7 @@ class RejectedController extends Controller
     public function exportExcel(Request $request)
     {
         if(!Gate::allows('退货管理-查询')){ return '没有权限';  }
+        $this->log(__METHOD__,'找不到表',json_encode($request->toArray()),Auth::user()['id']);
         ini_set('max_execution_time',2500);
         ini_set('memory_limit','1526M');
         $ids=$request->input('ids')??'';
@@ -400,6 +401,7 @@ class RejectedController extends Controller
     public function exportExcelOnFilterParams(Request $request)
     {
         if(!Gate::allows('退货管理-查询')){ return '没有权限';  }
+        $this->log(__METHOD__,'找不到表',json_encode($request->toArray()),Auth::user()['id']);
         ini_set('max_execution_time',2500);
         ini_set('memory_limit','1526M');
         $filterParams=json_decode($request->input('filterParams'),true);

+ 5 - 1
app/Http/Controllers/WaybillsController.php

@@ -58,6 +58,10 @@ class WaybillsController extends Controller
         if ($request->input('carrier_id')){
             $waybills=$waybills->where('carrier_id','=',$request->input('carrier_id'));
         }
+        if ($request->input('owners')){
+            $owners=array_values(json_decode($request->input('owners'),true));
+            $waybills=$waybills->whereIn('owner_id',$owners);
+        }
         if ($request->input('owner_id')){
             $waybills=$waybills->where('owner_id','=',$request->input('owner_id'));
         }
@@ -199,9 +203,9 @@ class WaybillsController extends Controller
             'recipient'=>$data['recipient'],
             'recipient_mobile'=>$data['recipient_mobile'],
             'charge'=>$data['charge'],
-            'collect_fee'=>isset($data['collect_fee'])?$data['collect_fee']:0,
             'ordering_remark'=>$data['ordering_remark']
         ]);
+        if (isset($data['collect_fee'])&&$data['collect_fee']>0)$waybill->collect_fee=$data['collect_fee'];
         $waybill->save();
         $number_id=$waybill->id;
         if ($data['type']=='直发车'){

+ 2 - 0
app/Http/Controllers/api/thirdPart/flux/WaybillController.php

@@ -82,6 +82,8 @@ class WaybillController extends Controller
                 'source_bill'=>$receiveInputting['ReservedField01']??'',
                 'destination_city_id'=>$city['id'],
             ]);
+            $dflist=config('merchantsInfo.waybill.DFList');
+            if (isset($dflist[$receiveInputting['CarrierID']]) && $dflist[$receiveInputting['CarrierID']])$waybill->collect_fee=0;
             if (isset($warehouseWeight)&&$warehouseWeight){
                 $waybill->warehouse_weight=$warehouseWeight;
                 $unit=Unit::where('name','m³')->first();

+ 4 - 0
config/merchantsInfo.php

@@ -10,6 +10,10 @@ return [
             "BSZXDF"=>true,
             "BSZX"=>true,
         ],
+        "DFList"=>[
+            "BSZXDF"=>true,
+            "BSZFCDF"=>true,
+        ],
     ],
     "address"=>[
         "武乡"=>"嘉定武乡仓",

+ 25 - 8
resources/views/waybill/index.blade.php

@@ -53,12 +53,16 @@
                                 <option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
                             </select>
                             <div style="position: relative;">
-                                <button type="button" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
-                                <span hidden class="border" style="position: absolute;left:0px;top:30px;width:80px;max-width:100px;background-color: white">
+                                <button type="button" v-show="!isOwnersBtn" @click="isOwnersBtn=true;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">多货主查询</button>
+                                <button type="button" v-show="isOwnersBtn" @click="isOwnersBtn=false;" style=" max-width: 100px" class="btn btn-sm btn-outline-dark container pull-left">收起货主</button>
+                                <span v-show="isOwnersBtn" class="border" style="position: absolute;left:0;top:30px;width:80px;max-height:100px;overflow:auto;background-color: white">
                                     <ul style="list-style-type:none" class="pl-0">
-                                        <li v-for="owner in owners" style="cursor: pointer;user-select:none" class="text-left">@{{owner.name}}<hr style="width: 100%"></li>
+                                        <li v-for="owner in owners" style="cursor: pointer;user-select:none;" :style="{'background-color':filterData.owners['_'+owner.id]?'#4aa0e6':''}"
+                                            @dblclick="selectedOwner(owner.id)" class="text-left">@{{owner.name}}<hr class="m-0" style="width: 100%"></li>
                                     </ul>
+
                                 </span>
+                                <input hidden name="owners" :value="JSON.stringify(filterData.owners)">
                             </div>
                             </div>
                         </td>
@@ -211,7 +215,7 @@
                     <td :class="[waybill.status=='已审核'?'text-success':'']">@{{waybill.status}}</td>
                     <td class="td-bill text-muted">@{{waybill.id}}</td>
                     <td class="td-bill text-muted">@{{waybill.created_at}}</td>
-                    <td class="td-bill">@{{waybill.type}}</td>
+                    <td class="td-bill">@{{waybill.type}} <span class="badge badge-sm bg-warning" v-if="waybill.collect_fee">到付</span></td>
                     <td class="td-bill">@{{waybill.owner}}</td>
                     <td class="td-bill">@{{waybill.source_bill}}</td>
                     <td class="td-bill">@{{waybill.wms_bill_number}}</td>
@@ -345,7 +349,7 @@
                         ,carrier_bill:'',carrier_id:''
                         ,owner_id:'',wms_bill_number:''
                         ,created_at_start:'',created_at_end:''
-                        ,type:'',status:'',origination:'',destination:'',},
+                        ,type:'',status:'',origination:'',destination:'',owners:{}},
                 wmsCommodities:[],
                 selectedStyle:[],
                 owners:[
@@ -353,6 +357,7 @@
                     {!! $owner !!},
                     @endforeach
                 ],
+                isOwnersBtn:false,
             },
             computed:{
                 isBeingFilterConditions:function(){
@@ -360,12 +365,12 @@
                     for(let key in this.filterData){
                         if(this.filterData[key]){
                             if(key==='paginate')continue;
+                            if (key==='owners' && Object.keys(this.filterData.owners).length<1)continue;
                             return true
                         }
                     }
                     return false;
                 },
-
             },
             watch:{
                 checkData:{
@@ -377,7 +382,7 @@
                         }
                     },
                     deep:true
-                }
+                },
             },
             mounted:function(){
                 this.initInputs();
@@ -396,6 +401,8 @@
                             $('input[name="'+key+'"]').val(val);
                             $('select[name="'+key+'"]').val(val);
                             decodeURI(data.filterData[key]=val);
+                            if (key==='owners')
+                                data.filterData['owners']=JSON.parse( unescape(val) );
                         });
                     }
                 },
@@ -586,13 +593,23 @@
                 },
                 elementCount:function(elementName){
                     return $(elementName).length;
+                },
+                //多货主查询
+                selectedOwner:function (id) {
+                    if (this.filterData.owners['_'+id]){
+                        this.$delete(this.filterData.owners,'_'+id);
+                        return;
+                    }
+                    this.$set(this.filterData.owners,'_'+id,id);
+                    if (this.filterData.owners.length===1)this.filterData.owner_id=id;
+                    else this.filterData.owner_id='';
                 }
             },
             filters:{
                 km:function(value){
                     if(!value)return '';
                     return value + ' km';
-                }
+                },
             }
         });
     </script>