Prechádzať zdrojové kódy

Merge branch 'Haozi'

# Conflicts:
#	resources/views/waybill/index.blade.php
LD 6 rokov pred
rodič
commit
014b44e341

+ 2 - 2
app/Exports/RejectedExport.php

@@ -65,7 +65,7 @@ class RejectedExport extends \PhpOffice\PhpSpreadsheet\Cell\StringValueBinder im
         $collection->prepend(['日期','审核号','客户名称','订单号','姓名',
         $collection->prepend(['日期','审核号','客户名称','订单号','姓名',
             '手机','原单单号','退回单号','退回公司','到付费用',
             '手机','原单单号','退回单号','退回公司','到付费用',
             '是否入库','商品条码','商品名称','数量','是否正品',
             '是否入库','商品条码','商品名称','数量','是否正品',
-            '批次号','生产日期','效期','备注','录入人']);
+            '批次号','生产日期','效期','备注','退单备注','录入人']);
         return $collection;
         return $collection;
     }
     }
     private function injectRecord($collection,$bill,$item){
     private function injectRecord($collection,$bill,$item){
@@ -77,7 +77,7 @@ class RejectedExport extends \PhpOffice\PhpSpreadsheet\Cell\StringValueBinder im
             $bill['logistic_number_return'],$bill['logistic_name'],
             $bill['logistic_number_return'],$bill['logistic_name'],
             $bill['fee_collected'],$bill['is_loaded_str'],
             $bill['fee_collected'],$bill['is_loaded_str'],
             $item['barcode_goods'],$item['name_goods'],$item['amount'],$item['quality_label'],
             $item['barcode_goods'],$item['name_goods'],$item['amount'],$item['quality_label'],
-            $item['batch_number'],$item['made_at'],$item['validity_at'],$item['remark'],$bill['operator_name']]);
+            $item['batch_number'],$item['made_at'],$item['validity_at'],$item['remark'],$bill['remark'],$bill['operator_name']]);
         return $collection;
         return $collection;
     }
     }
 
 

+ 0 - 9
app/Http/Controllers/MeasureMonitorController.php

@@ -27,7 +27,6 @@ class MeasureMonitorController extends Controller
     public function data(Request $request){
     public function data(Request $request){
         $measuring_machine_id=$request->input('id');
         $measuring_machine_id=$request->input('id');
         if ($measuring_machine_id){
         if ($measuring_machine_id){
-            /*$package=Package::with('owner','paperBox','measuringMachine')->where('measuring_machine_id',$measuringMachines[0]->id)->orderBy('id','DESC')->first();*/
             $package=Package::with('owner','paperBox','measuringMachine')->where('measuring_machine_id',$measuring_machine_id)->orderBy('id','DESC')->first();
             $package=Package::with('owner','paperBox','measuringMachine')->where('measuring_machine_id',$measuring_machine_id)->orderBy('id','DESC')->first();
             if (!$package){
             if (!$package){
                 $measuringMachine=MeasuringMachine::where('id',$measuring_machine_id)->first();
                 $measuringMachine=MeasuringMachine::where('id',$measuring_machine_id)->first();
@@ -36,14 +35,6 @@ class MeasureMonitorController extends Controller
             }
             }
             return $package;
             return $package;
         }
         }
-        /*else{
-            $package=Package::with('owner','paperBox','measuringMachine')->where('measuring_machine_id',$measuring_machine_id)->orderBy('id','DESC')->first();
-            if (!$package){
-                $measuringMachine=MeasuringMachine::where('id',$measuring_machine_id)->first();
-                $package=new Package();
-                if ($measuringMachine)$package->measuringMachine=$measuringMachine;
-            }*/
-
         return '';
         return '';
     }
     }
 
 

+ 4 - 2
app/Http/Controllers/PackageController.php

@@ -46,10 +46,12 @@ class PackageController extends Controller
             $packages=$this->preciseQuery('logistic_number',$request,$packages);
             $packages=$this->preciseQuery('logistic_number',$request,$packages);
         }
         }
         if ($request->input('created_at_start')){
         if ($request->input('created_at_start')){
-            $packages=$packages->where('created_at','>=',$request->input('created_at_start'));
+            $created_at_start=$request->input('created_at_start')." 00:00:00";
+            $packages=$packages->where('created_at','>=',$created_at_start);
         }
         }
         if ($request->input('created_at_end')){
         if ($request->input('created_at_end')){
-            $packages=$packages->where('created_at','<=',$request->input('created_at_end'));
+            $created_at_end=$request->input('created_at_end')." 23:59:59";
+            $packages=$packages->where('created_at','<=',$created_at_end);
         }
         }
         if ($request->input('owner_id')){
         if ($request->input('owner_id')){
             $packages=$packages->where('owner_id',$request->input('owner_id'));
             $packages=$packages->where('owner_id',$request->input('owner_id'));

+ 4 - 2
app/Http/Controllers/ProcessController.php

@@ -41,10 +41,12 @@ class ProcessController extends Controller
             });
             });
         }
         }
         if ($request->input('date_start')){
         if ($request->input('date_start')){
-            $processes=$processes->where('created_at','>=',$request->input('date_start'));
+            $date_start=$request->input('date_start')." 00:00:00";
+            $processes=$processes->where('created_at','>=',$date_start);
         }
         }
         if ($request->input('date_end')){
         if ($request->input('date_end')){
-            $processes=$processes->where('created_at','<=',$request->input('date_end'));
+            $date_end=$request->input('date_end')." 23:59:59";
+            $processes=$processes->where('created_at','<=',$date_end);
         }
         }
         if ($request->input('owner_id')){
         if ($request->input('owner_id')){
             $processes=$processes->where('owner_id',$request->input('owner_id'));
             $processes=$processes->where('owner_id',$request->input('owner_id'));

+ 14 - 8
app/Http/Controllers/RejectedController.php

@@ -23,6 +23,7 @@ use Illuminate\Support\Facades\Session;
 use Illuminate\Support\Facades\Validator;
 use Illuminate\Support\Facades\Validator;
 use Illuminate\View\View;
 use Illuminate\View\View;
 use Maatwebsite\Excel\Facades\Excel;
 use Maatwebsite\Excel\Facades\Excel;
+use phpDocumentor\Reflection\Types\Array_;
 use function foo\func;
 use function foo\func;
 
 
 class RejectedController extends Controller
 class RejectedController extends Controller
@@ -184,15 +185,20 @@ class RejectedController extends Controller
             }
             }
         }
         }
         if($logistic_number_return){
         if($logistic_number_return){
-            $startDay = Carbon::now()->subDays(15);
-            $rejectedBillsQueryTem=clone $rejectedBillsQuery;
-            $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('created_at','>',$startDay->format('Y-m-d'));
-            $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('logistic_number_return','like','%'.$logistic_number_return.'%');
-            if($rejectedBillsQueryTem->count()==0
-                ||$rejectedBillsQueryTem->first()['logistic_number_return']==$logistic_number_return){
-                $rejectedBillsQuery=$rejectedBillsQuery->where('logistic_number_return',$logistic_number_return);
+            if(strpos($logistic_number_return,',')||strpos($logistic_number_return,',')||strpos($logistic_number_return,' ')){
+                $arr=array_filter(preg_split('/[,, ]+/is', $logistic_number_return));
+                $rejectedBillsQuery=$rejectedBillsQuery->whereIn('logistic_number_return',$arr);
             }else{
             }else{
-                $rejectedBillsQuery=$rejectedBillsQueryTem;
+                $startDay = Carbon::now()->subDays(15);
+                $rejectedBillsQueryTem=clone $rejectedBillsQuery;
+                $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('created_at','>',$startDay->format('Y-m-d'));
+                $rejectedBillsQueryTem=$rejectedBillsQueryTem->where('logistic_number_return','like','%'.$logistic_number_return.'%');
+                if($rejectedBillsQueryTem->count()==0
+                    ||$rejectedBillsQueryTem->first()['logistic_number_return']==$logistic_number_return){
+                    $rejectedBillsQuery=$rejectedBillsQuery->where('logistic_number_return',$logistic_number_return);
+                }else{
+                    $rejectedBillsQuery=$rejectedBillsQueryTem;
+                }
             }
             }
         }
         }
         if($logistic_number){
         if($logistic_number){

+ 4 - 2
app/Http/Controllers/WaybillFinancialExceptedController.php

@@ -13,10 +13,12 @@ class WaybillFinancialExceptedController extends Controller
 {
 {
     public function conditionQuery(Request $request,$waybillFinancialSnapshots){
     public function conditionQuery(Request $request,$waybillFinancialSnapshots){
         if ($request->input('created_at_start')){
         if ($request->input('created_at_start')){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
+            $created_at_start=$request->input('created_at_start')." 00:00:00";
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>=',$created_at_start);
         }
         }
         if ($request->input('created_at_end')){
         if ($request->input('created_at_end')){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
+            $created_at_end=$request->input('created_at_end')." 23:59:59";
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<=',$created_at_end);
         }
         }
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
         return $waybillFinancialSnapshots;
         return $waybillFinancialSnapshots;

+ 4 - 2
app/Http/Controllers/WaybillFinancialSnapshotsController.php

@@ -14,10 +14,12 @@ class WaybillFinancialSnapshotsController extends Controller
 {
 {
     public function conditionQuery(Request $request,$waybillFinancialSnapshots){
     public function conditionQuery(Request $request,$waybillFinancialSnapshots){
         if ($request->input('created_at_start')){
         if ($request->input('created_at_start')){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>',$request->input('created_at_start'));
+            $created_at_start=$request->input('created_at_start')." 00:00:00";
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','>=',$created_at_start);
         }
         }
         if ($request->input('created_at_end')){
         if ($request->input('created_at_end')){
-            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<',$request->input('created_at_end'));
+            $created_at_end=$request->input('created_at_end')." 23:59:59";
+            $waybillFinancialSnapshots=$waybillFinancialSnapshots->where('created_at','<=',$created_at_end);
         }
         }
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
         $waybillFinancialSnapshots=$waybillFinancialSnapshots->paginate(50);
         return $waybillFinancialSnapshots;
         return $waybillFinancialSnapshots;

+ 7 - 2
app/Http/Controllers/WaybillsController.php

@@ -63,10 +63,12 @@ class WaybillsController extends Controller
             $waybills=$this->preciseQuery("destination",$request,$waybills);
             $waybills=$this->preciseQuery("destination",$request,$waybills);
         }
         }
         if ($request->input('created_at_start')){
         if ($request->input('created_at_start')){
-            $waybills=$waybills->where('created_at','>',$request->input('created_at_start'));
+            $created_at_start=$request->input('created_at_start')." 00:00:00";
+            $waybills=$waybills->where('created_at','>=',$created_at_start);
         }
         }
         if ($request->input('created_at_end')){
         if ($request->input('created_at_end')){
-            $waybills=$waybills->where('created_at','<',$request->input('created_at_end'));
+            $created_at_end=$request->input('created_at_end')." 23:59:59";
+            $waybills=$waybills->where('created_at','<=',$created_at_end);
         }
         }
         if ($request->input('status')){
         if ($request->input('status')){
             $waybills=$waybills->where('status',$request->input('status'));
             $waybills=$waybills->where('status',$request->input('status'));
@@ -599,6 +601,8 @@ class WaybillsController extends Controller
         $row=[[
         $row=[[
             'type'=>'运单类型',
             'type'=>'运单类型',
             'owner'=>'货主',
             'owner'=>'货主',
+            'source_bill'=>'上游单号',
+            'wms_bill_number'=>'wms订单号',
             'waybill_number'=>'运单号',
             'waybill_number'=>'运单号',
             'origination'=>'始发地',
             'origination'=>'始发地',
             'destination'=>'目的地',
             'destination'=>'目的地',
@@ -641,6 +645,7 @@ class WaybillsController extends Controller
                 'type'=>isset($waybill->type)?$waybill->type:'',
                 'type'=>isset($waybill->type)?$waybill->type:'',
                 'waybill_number'=>isset($waybill->waybill_number)?$waybill->waybill_number:'',
                 'waybill_number'=>isset($waybill->waybill_number)?$waybill->waybill_number:'',
                 'owner'=>isset($waybill->owner->name)?$waybill->owner->name:'',
                 'owner'=>isset($waybill->owner->name)?$waybill->owner->name:'',
+                'source_bill'=>isset($waybill->source_bill)?$waybill->source_bill:'',
                 'wms_bill_number'=>isset($waybill->wms_bill_number)?$waybill->wms_bill_number:'',
                 'wms_bill_number'=>isset($waybill->wms_bill_number)?$waybill->wms_bill_number:'',
                 'origination'=>isset($waybill->origination)?$waybill->origination:'',
                 'origination'=>isset($waybill->origination)?$waybill->origination:'',
                 'destination'=>isset($waybill->destination)?$waybill->destination:'',
                 'destination'=>isset($waybill->destination)?$waybill->destination:'',

+ 3 - 3
resources/views/process/index.blade.php

@@ -57,9 +57,9 @@
                                <input name="commodity_barcode" v-model="filterData.commodity_barcode" class="form-control-sm" placeholder="商品条码" :class="filterData.commodity_barcode?'bg-warning':''">
                                <input name="commodity_barcode" v-model="filterData.commodity_barcode" class="form-control-sm" placeholder="商品条码" :class="filterData.commodity_barcode?'bg-warning':''">
                            </td>
                            </td>
                            <td >
                            <td >
-                               <label for="status">&nbsp;状&nbsp;&nbsp;态&nbsp;:</label>
-                               <select id="status" name="status" v-model="filterData.status" @change="submit" class="form-control-sm tooltipTarget" :class="filterData.status?'bg-warning':''">
-                                   <option >    </option>
+
+                               <select id="status" name="status" v-model="filterData.status" @change="submit" class="form-control-sm tooltipTarget" :class="filterData.status?'bg-warning':''" >
+                                   <option value="" selected>状态</option>
                                    <option value="待接单">待接单</option>
                                    <option value="待接单">待接单</option>
                                    <option value="待加工">待加工</option>
                                    <option value="待加工">待加工</option>
                                    <option value="驳回">驳回</option>
                                    <option value="驳回">驳回</option>

+ 1 - 1
resources/views/rejected/index.blade.php

@@ -58,7 +58,7 @@
                                 <td>
                                 <td>
                                     <input type="text" class="form-control-sm tooltipTarget" placeholder="退回单号" name="logistic_number_return"
                                     <input type="text" class="form-control-sm tooltipTarget" placeholder="退回单号" name="logistic_number_return"
                                            :class="filterParams.logistic_number_return?'bg-warning':''"
                                            :class="filterParams.logistic_number_return?'bg-warning':''"
-                                           @input="logistic_number_returnEntering" @keypress="submitFilterOnEnter" title="退回单号:15天以内的支持模糊搜索,回车提交">
+                                           @input="logistic_number_returnEntering" @keypress="submitFilterOnEnter" title="退回单号:支持查找多个以逗号或空格分隔的单号,15天以内的支持模糊搜索,回车提交">
                                 </td>
                                 </td>
                                 <td>
                                 <td>
                                     <input type="text" class="form-control-sm tooltipTarget" placeholder="原单单号" name="logistic_number"
                                     <input type="text" class="form-control-sm tooltipTarget" placeholder="原单单号" name="logistic_number"

+ 5 - 5
resources/views/weight/package/index.blade.php

@@ -36,7 +36,7 @@
                                     <span class="text-muted">根据条件过滤:</span>
                                     <span class="text-muted">根据条件过滤:</span>
                                 </td>
                                 </td>
                                 <td >
                                 <td >
-                                        <input style="width: 150px" name="created_at_start" type="date" v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''" class="form-control-sm tooltipTarget" title="选择显示指定日期的起始时间">
+                                    <input style="width: 150px" name="created_at_start" type="date" v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''" class="form-control-sm tooltipTarget" title="选择显示指定日期的起始时间">
 
 
                                 </td>
                                 </td>
                                 <td>
                                 <td>
@@ -44,7 +44,7 @@
                                            style="width:70px" @input="owner_seek"
                                            style="width:70px" @input="owner_seek"
                                            title="输入关键词快速定位下拉列表,回车确定">
                                            title="输入关键词快速定位下拉列表,回车确定">
                                     <select name="owner_id" id="owner_id" :class="filterData.owner_id?'bg-warning':''" v-model="filterData.owner_id" @change="setOwner"
                                     <select name="owner_id" id="owner_id" :class="filterData.owner_id?'bg-warning':''" v-model="filterData.owner_id" @change="setOwner"
-                                             class="form-control-sm tooltipTarget"  title="选择要显示的客户">
+                                            class="form-control-sm tooltipTarget"  title="选择要显示的客户">
                                         @foreach($owners as $owner)
                                         @foreach($owners as $owner)
                                             <option value="{{$owner->id}}">{{$owner->name}}</option>
                                             <option value="{{$owner->id}}">{{$owner->name}}</option>
                                         @endforeach
                                         @endforeach
@@ -53,9 +53,9 @@
                                 </td>
                                 </td>
 
 
                                 <td >
                                 <td >
-                                        <input :class="filterData.logistic_number?'bg-warning':''" type="text" title="支持15内模糊搜索与15天外精确搜索" name="logistic_number" class="form-control-sm  tooltipTarget" v-model="filterData.logistic_number" style="vertical-align: middle" placeholder="快递单号"></td>
+                                    <input :class="filterData.logistic_number?'bg-warning':''" type="text" title="支持15内模糊搜索与15天外精确搜索" name="logistic_number" class="form-control-sm  tooltipTarget" v-model="filterData.logistic_number" style="vertical-align: middle" placeholder="快递单号"></td>
                                 <td >
                                 <td >
-                                        <input :class="filterData.delivery_number?'bg-warning':''" type="text" title="支持15内模糊搜索与15天外精确搜索" name="delivery_number" class="form-control-sm  tooltipTarget" v-model="filterData.delivery_number" style="vertical-align: middle" placeholder="发货单号"></td>
+                                    <input :class="filterData.delivery_number?'bg-warning':''" type="text" title="支持15内模糊搜索与15天外精确搜索" name="delivery_number" class="form-control-sm  tooltipTarget" v-model="filterData.delivery_number" style="vertical-align: middle" placeholder="发货单号"></td>
                                 <td colspan="5"></td>
                                 <td colspan="5"></td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
@@ -63,7 +63,7 @@
                                     <input style="width: 150px" type="date" name="created_at_end" v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''" class="form-control-sm tooltipTarget" title="选择显示指定日期的结束时间">
                                     <input style="width: 150px" type="date" name="created_at_end" v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''" class="form-control-sm tooltipTarget" title="选择显示指定日期的结束时间">
                                 </td>
                                 </td>
                                 <td >
                                 <td >
-                                        <input type="text" title="支持15内模糊搜索与15天外精确搜索" name="batch_number" class="form-control-sm  tooltipTarget" v-model="filterData.batch_number"  :class="filterData.batch_number?'bg-warning':''" style="vertical-align: middle" placeholder="波次号"></td>
+                                    <input type="text" title="支持15内模糊搜索与15天外精确搜索" name="batch_number" class="form-control-sm  tooltipTarget" v-model="filterData.batch_number"  :class="filterData.batch_number?'bg-warning':''" style="vertical-align: middle" placeholder="波次号"></td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
                                 <td>
                                 <td>