Prechádzať zdrojové kódy

订单管理-查询条件增加time,多货主时隐藏单货主选择

dream 5 rokov pred
rodič
commit
b5b633b065

+ 12 - 2
app/Http/Controllers/OrderController.php

@@ -15,6 +15,8 @@ use Maatwebsite\Excel\Facades\Excel;
 class OrderController extends Controller
 {
     private function preciseQuery($request,$sql){
+        $orderdate_start=$request->input('orderdate_start');
+        $orderdate_end=$request->input('orderdate_end');
         $ordertime_start=$request->input('ordertime_start');
         $ordertime_end=$request->input('ordertime_end');
         $customerid=$request->input('customerid');
@@ -27,8 +29,16 @@ class OrderController extends Controller
         $notes=$request->input('notes');
         $addtime=$request->input('addtime');
         $waveno=$request->input('waveno');
-        if ($ordertime_start)$sql.=" and ordertime>='".$ordertime_start." 00:00:00'";
-        if ($ordertime_end)$sql.=" and ordertime<='".$ordertime_end." 23:59:59'";
+        if ($orderdate_start){
+            $sql.=" and ordertime>='".$orderdate_start;
+            if ($ordertime_start)$sql.=" ".$ordertime_start.":00'";
+            else $sql.=" 00:00:00'";
+        }
+        if ($orderdate_end){
+            $sql.=" and ordertime<='".$orderdate_end;
+            if ($ordertime_end)$sql.=" ".$ordertime_end.":59' ";
+            else $sql.=" 23:59:59' ";
+        }
         if ($customerid)$sql.=" and customerid='".$customerid."'";
         if ($orderno)$sql.=" and orderno like '".$orderno."%'";
         if ($codename_c)$sql.=" and sostatus = '".$codename_c."'";

+ 100 - 103
app/Http/Controllers/TestController.php

@@ -30,174 +30,171 @@ use Zttp\Zttp;
 
 class TestController extends Controller
 {
-    private $data=[];
+    private $data = [];
+
     public function __construct()
     {
-        $this->data["active_test"]="active";
+        $this->data["active_test"] = "active";
     }
-    public function method(Request $request,$method)
+
+    public function method(Request $request, $method)
     {
-        return call_user_func([$this, $method],$request);
+        return call_user_func([$this, $method], $request);
     }
-    function packageFromLog(Request $request){ //x        $packagesBatch=Package::where('batch_number',$batch_number)->first();
-
-        ini_set('max_execution_time',2500);
-        ini_set('memory_limit','1526M');
-        $uploaded=0;
-        $count=DB::table('logs')->where('operation','like',"%PackageController::new_%" )
-            ->where('created_at','>',"2020-06-08 15:46:00")
-            ->where('created_at','<',"2020-06-08 15:47:00")
-            ->where('type',"request_new_")
+
+    function packageFromLog(Request $request)
+    { //x        $packagesBatch=Package::where('batch_number',$batch_number)->first();
+
+        ini_set('max_execution_time', 2500);
+        ini_set('memory_limit', '1526M');
+        $uploaded = 0;
+        $count = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
+            ->where('created_at', '>', "2020-06-08 15:46:00")
+            ->where('created_at', '<', "2020-06-08 15:47:00")
+            ->where('type', "request_new_")
             ->count();
-        $requests=DB::table('logs')->where('operation','like',"%PackageController::new_%" )
-            ->where('created_at','>',"2020-06-08 15:46:00")
-            ->where('created_at','<',"2020-06-08 15:47:00")
-            ->where('type',"request_new_")
+        $requests = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
+            ->where('created_at', '>', "2020-06-08 15:46:00")
+            ->where('created_at', '<', "2020-06-08 15:47:00")
+            ->where('type', "request_new_")
             ->get();
-        $requests->each(function($request)use(&$uploaded){
-            $requestJson=json_decode($request->description,true);
-            $response = Zttp::withHeaders([ 'content-type' => 'application/json',
+        $requests->each(function ($request) use (&$uploaded) {
+            $requestJson = json_decode($request->description, true);
+            $response = Zttp::withHeaders(['content-type' => 'application/json',
             ])->post('https://was.baoshi56.com/api/thirdPart/flux/package/new',
                 $requestJson
             );
-            if($response->json()&&$response->json()['response']&&$response->json()['response']['flag']=='Y')
-                $uploaded+=1;
+            if ($response->json() && $response->json()['response'] && $response->json()['response']['flag'] == 'Y')
+                $uploaded += 1;
         });
-        dd($uploaded.'/'.$count);
+        dd($uploaded . '/' . $count);
 
 
     }
-    function t2(Request $request){ //x        $packagesBatch=Package::where('batch_number',$batch_number)->first();
-
-        $uploaded=0;
-        $count=DB::table('logs')->where('operation','like',"%PackageController::new_%" )
-            ->where('created_at','>',"2020-06-03 14:02:00")
-            ->where('created_at','<',"2020-06-03 15:05:00")
-            ->where('type',"request_new_")
-            ->where('description','like',"%W200603000117%")
+
+    function t2(Request $request)
+    { //x        $packagesBatch=Package::where('batch_number',$batch_number)->first();
+
+        $uploaded = 0;
+        $count = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
+            ->where('created_at', '>', "2020-06-03 14:02:00")
+            ->where('created_at', '<', "2020-06-03 15:05:00")
+            ->where('type', "request_new_")
+            ->where('description', 'like', "%W200603000117%")
             ->count();
-        $requests=DB::table('logs')->where('operation','like',"%PackageController::new_%" )
-            ->where('created_at','>',"2020-06-03 14:02:00")
-            ->where('created_at','<',"2020-06-03 15:05:00")
-            ->where('description','like',"%W200603000117%")
-            ->where('type',"request_new_")
+        $requests = DB::table('logs')->where('operation', 'like', "%PackageController::new_%")
+            ->where('created_at', '>', "2020-06-03 14:02:00")
+            ->where('created_at', '<', "2020-06-03 15:05:00")
+            ->where('description', 'like', "%W200603000117%")
+            ->where('type', "request_new_")
             ->get();
-        $requests->each(function($request)use(&$uploaded){
-            $requestJson=json_decode($request->description,true);
-            $response = Zttp::withHeaders([ 'content-type' => 'application/json',
+        $requests->each(function ($request) use (&$uploaded) {
+            $requestJson = json_decode($request->description, true);
+            $response = Zttp::withHeaders(['content-type' => 'application/json',
             ])->post('https://was.baoshi56.com/api/thirdPart/flux/package/new',
                 $requestJson
             );
-            if($response->json()&&$response->json()['response']&&$response->json()['response']['flag']=='Y')
-                $uploaded+=1;
+            if ($response->json() && $response->json()['response'] && $response->json()['response']['flag'] == 'Y')
+                $uploaded += 1;
         });
-        dd($uploaded.'/'.$count);
+        dd($uploaded . '/' . $count);
 
 
     }
-    function tj(Request $request){
-        $waybills=Waybill::where('created_at','like','%2020-05-25%')->orWhere('created_at','like','%2020-05-30%')->get();
-        $controller=(new WaybillController());
-        $waybills->each(function ($waybill)use($controller){
+
+    function tj(Request $request)
+    {
+        $waybills = Waybill::where('created_at', 'like', '%2020-05-25%')->orWhere('created_at', 'like', '%2020-05-30%')->get();
+        $controller = (new WaybillController());
+        $waybills->each(function ($waybill) use ($controller) {
             $controller->accomplishToWMS($waybill);
         });
         dd($waybills->count());
     }
-    function injectJS(Request $request){
-        $items=RejectedBillItem::whereHas('rejectedBill',function($query){
-            return $query->where('id_owner',2);
-        })->where('created_at','>','2019-12-23 18:11:00')->where('created_at','<','2019-12-24 11:25:00')->get();
+
+    function injectJS(Request $request)
+    {
+        $items = RejectedBillItem::whereHas('rejectedBill', function ($query) {
+            return $query->where('id_owner', 2);
+        })->where('created_at', '>', '2019-12-23 18:11:00')->where('created_at', '<', '2019-12-24 11:25:00')->get();
         (new RejectedBillItemController())->collectionsToPackConfirm($items);
     }
+
     public function tj2(Request $request)
     {
         $rejected = Rejected::find(10);
-        $rejectedJianshang=new \App\Http\Controllers\api\jianshang\RejectedController();
-        dd( $rejectedJianshang->sendRejected($rejected));
+        $rejectedJianshang = new \App\Http\Controllers\api\jianshang\RejectedController();
+        dd($rejectedJianshang->sendRejected($rejected));
     }
+
     public function excelIt()
     {
-        $excel=new ExcelController();
+        $excel = new ExcelController();
         return $excel->makeExcel();
     }
+
     public function featureIt()
     {
-        LogisticNumberFeatureController::loadRecentRejectedsToFeatures(5,2500);
+        LogisticNumberFeatureController::loadRecentRejectedsToFeatures(5, 2500);
     }
+
     public function newSku()
     {
-        $url='http://bswcs/api/sorting/flux/newSku';
+        $url = 'http://bswcs/api/sorting/flux/newSku';
         $response = Zttp::post($url, [
-            'request'=>[
+            'request' => [
                 [
-                    "SKU"=> "1234567890",
-                    "NAME"=> "瑞士莲**巧克力",
-                    "Alternate_SKU1"=> "1122334455",
-                    "GrossWeight"=> "1.2",
-                    "Cube"=> "0.75",
-                    "SKULength"=> "0.25",
-                    "SKUWidth"=> "0.15",
-                    "SKUHigh"=> "0.05"
+                    "SKU" => "1234567890",
+                    "NAME" => "瑞士莲**巧克力",
+                    "Alternate_SKU1" => "1122334455",
+                    "GrossWeight" => "1.2",
+                    "Cube" => "0.75",
+                    "SKULength" => "0.25",
+                    "SKUWidth" => "0.15",
+                    "SKUHigh" => "0.05"
                 ],
                 [
-                    "SKU"=> "1234567892",
-                    "NAME"=> "跳跳饼",
-                    "Alternate_SKU1"=> "",
-                    "GrossWeight"=> "1.3",
-                    "Cube"=> "0.75",
-                    "SKULength"=> "0.25",
-                    "SKUWidth"=> "0.15",
-                    "SKUHigh"=> "0.25"
+                    "SKU" => "1234567892",
+                    "NAME" => "跳跳饼",
+                    "Alternate_SKU1" => "",
+                    "GrossWeight" => "1.3",
+                    "Cube" => "0.75",
+                    "SKULength" => "0.25",
+                    "SKUWidth" => "0.15",
+                    "SKUHigh" => "0.25"
                 ],
             ]
         ]);
         return $response->json();
     }
 
-    public function changePackage(){
-        $packages=Package::where('delivery_number','<>',null)->where('logistic_id',null)->get();
+    public function changePackage()
+    {
+        $packages = Package::where('delivery_number', '<>', null)->where('logistic_id', null)->get();
         dd($packages);
-        $packages=Package::whereRaw('delivery_number IS NOT NULL AND logistic_id IS NULL')->get();
-        $logistics=Logistic::get();
-        $packages->each(function ($package)use($logistics){
-            $logistics->each(function ($logistic)use($package){
-                if ($package->WMSReflectPackage->CarrierID==$logistic->code){
-                    $package->logistic_id=$logistic->id;
+        $packages = Package::whereRaw('delivery_number IS NOT NULL AND logistic_id IS NULL')->get();
+        $logistics = Logistic::get();
+        $packages->each(function ($package) use ($logistics) {
+            $logistics->each(function ($logistic) use ($package) {
+                if ($package->WMSReflectPackage->CarrierID == $logistic->code) {
+                    $package->logistic_id = $logistic->id;
                     return;
                 }
             });
         });
         return "OK";
     }
-    public function tNull(){
+
+    public function tNull()
+    {
     }
 
     public function deletePackageAuthority()
     {
-        $authorities=Authority::where('name','like','%包裹信息%')->get();
-        $authorities->each(function ($authority){
+        $authorities = Authority::where('name', 'like', '%包裹信息%')->get();
+        $authorities->each(function ($authority) {
             $authority->delete();
         });
     }
 
-    function test($l1,$l2){
-        if ($l1 === null) return $l2;
-        if ($l2 === null) return $l1;
-
-        if ($l1->val < $l2->val) {
-            $l1->next = $this->test($l1->next, $l2);
-            return $l1;
-        } else {
-            $l2->next = $this->test($l1, $l2->next);
-            return $l2;
-        }
-    }
-}
-class ListNode {
-    public $val = 0;
-    public $next = null;
-    function __construct($val = 0, $next = null) {
-        $this->val = $val;
-        $this->next = $next;
-    }
 }

+ 18 - 7
resources/views/order/index/delivering.blade.php

@@ -30,8 +30,11 @@
                                     <option v-for="code in codes" :value="code.code" class="font-weight-bold">@{{ code.codename_c }}</option>
                                 </select></td>
                             <td style="width: 300px">
-                                <input style="max-width: 200px"  type="date" name="ordertime_start" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
-                                       v-model="filterData.ordertime_start" :class="filterData.ordertime_start?'bg-warning':''">
+                                <div class="form-inline">
+                                <input style="max-width: 150px"  type="date" name="orderdate_start" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
+                                       v-model="filterData.orderdate_start" :class="filterData.orderdate_start?'bg-warning':''">
+                                <input style="max-width: 100px"  type="time" name="ordertime_start" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
+                                       v-model="filterData.ordertime_start" :class="filterData.ordertime_start?'bg-warning':''"></div>
                             </td>
                             <td style="width: 300px">
                                 <input style="max-width: 200px" name="orderno" v-model="filterData.orderno" class="form-control form-control-sm tooltipTarget" placeholder="编号" title="编号,糊模查找需要在左边打上%符号" autocomplete="off" :class="filterData.orderno?'bg-warning':''">
@@ -68,8 +71,11 @@
                                 </div>
                             </td>
                             <td>
-                                <input style="max-width: 200px"  type="date" class=" form-control form-control-sm tooltipTarget" name="ordertime_end" title="选择显示指定日期的结束时间"
-                                       v-model="filterData.ordertime_end" :class="filterData.ordertime_end?'bg-warning':''" >
+                                <div class="form-inline">
+                                <input style="max-width: 150px"  type="date" class=" form-control form-control-sm tooltipTarget" name="orderdate_end" title="选择显示指定日期的结束时间"
+                                       v-model="filterData.orderdate_end" :class="filterData.orderdate_end?'bg-warning':''" >
+                                <input style="max-width: 100px"  type="time" class="form-control form-control-sm tooltipTarget" name="ordertime_end" title="选择显示指定日期的结束时间"
+                                       v-model="filterData.ordertime_end" :class="filterData.ordertime_end?'bg-warning':''" ></div>
                             </td>
                             <td >
                                 <input style="max-width: 200px" name="soreference5" placeholder="多快递单号" v-model="filterData.soreference5" class="form-control form-control-sm tooltipTarget" title="可支持多快递单号,糊模查找需要在左边打上%符号" autocomplete="off" :class="filterData.soreference5?'bg-warning':''">
@@ -83,7 +89,7 @@
                             <td>
                                 <input style="max-width: 200px" name="alternate_sku1" v-model="filterData.alternate_sku1" title="产品条码,模糊查找需要在左边打上%的符号" class="form-control form-control-sm tooltipTarget" placeholder="产品条码" :class="filterData.alternate_sku1?'bg-warning':''">
                             </td>
-                            <td colspan="4"><input hidden type="submit"></td>
+                            <td colspan="4"><button class="btn btn-sm btn-outline-dark pull-left" type="submit">按条件搜索</button></td>
                         </tr>
                         <tr>
                             <td colspan="10">
@@ -228,7 +234,7 @@
             el:"#list",
             data:{
                 filterData:{
-                    paginate:50,ordertime_start:'',ordertime_end:'',customerid:'',orderno:'',soreference5:'',codename_c:'',
+                    paginate:50,ordertime_start:'',orderdate_start:'',orderdate_end:'',ordertime_end:'',customerid:'',orderno:'',soreference5:'',codename_c:'',
                     carriername:'',issuepartyname:'',soreference1:'',notes:'',addtime:'31',alternate_sku1:'',waveno:'',
                 },
                 page:Number('{{$page}}'),
@@ -291,6 +297,8 @@
                             $('input[name="'+key+'"]').val(val);
                             $('select[name="'+key+'"]').val(val);
                             decodeURI(data.filterData[key]=val);
+                            if (key==='ordertime_start' || key==='ordertime_end')
+                                data.filterData[key]=unescape(val);
                         });
                     }
                 },
@@ -315,6 +323,8 @@
                 },
                 href(){
                     let url="{{url('order/index/delivering?page=')}}"+this.page;
+                    if (this.filterData.orderdate_start)url+="&&orderdate_start="+this.filterData.orderdate_start;
+                    if (this.filterData.orderdate_end)url+="&&orderdate_end="+this.filterData.orderdate_end;
                     if (this.filterData.ordertime_start)url+="&&ordertime_start="+this.filterData.ordertime_start;
                     if (this.filterData.ordertime_end)url+="&&ordertime_end="+this.filterData.ordertime_end;
                     if (this.filterData.customerid)url+="&&customerid="+this.filterData.customerid;
@@ -380,7 +390,8 @@
                         if (!confirm("需要导出的条数超过了一万条,等待时间较长,是否继续?"))return;
                     }
                     window.open("{{url('order/index/delivering?ordertime_start=')}}"+this.filterData.ordertime_start
-                        +"&&ordertime_end="+this.filterData.ordertime_end+"&&orderno="+this.filterData.orderno
+                        +"&&ordertime_end="+this.filterData.ordertime_end+"&&orderdate_start="+this.filterData.orderdate_start
+                        +"&&orderdate_end="+this.filterData.orderdate_end+"&&orderno="+this.filterData.orderno
                         +"&&soreference5="+this.filterData.soreference5+"&&export="+true+"&&codename_c="+this.filterData.codename_c
                         +"&&issuepartyname="+this.filterData.issuepartyname+"&&customerid="+this.filterData.customerid
                         +"&&soreference1="+this.filterData.soreference1+"&&notes="+this.filterData.notes

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

@@ -52,7 +52,7 @@
                                <input name="commodity_barcode" style="max-width: 200px" title="商品条码:支持15内模糊搜索与15天外精确搜索" v-model="filterData.commodity_barcode" class="form-control form-control-sm tooltipTarget" placeholder="商品条码" :class="filterData.commodity_barcode?'bg-warning':''">
                            </td>
                            <td >
-
+                                <div class="form-inline">
                                <select id="status" name="status" v-model="filterData.status" @change="submit" style="max-width: 100px" class="form-control form-control-sm tooltipTarget" :class="filterData.status?'bg-warning':''" >
                                    <option value="" selected>状态</option>
                                    <option value="待接单">待接单</option>
@@ -62,10 +62,9 @@
                                    <option value="待验收">待验收</option>
                                    <option value="已完成">已完成</option>
                                </select>
+                               <button class="btn btn-sm btn-outline-dark pull-left ml-5" type="submit">按条件搜索</button></div>
                            </td>
-                           <td colspan="6">
-                               <input hidden type="submit" >
-                           </td>
+                           <td colspan="6"></td>
                        </tr>
                        <tr>
                            <td colspan="9">

+ 47 - 32
resources/views/waybill/index.blade.php

@@ -48,10 +48,11 @@
                     <tr >
                         <td >
                             <div class="form-inline">
-                                <select name="owner_id"  v-model="filterData.owner_id"  class="form-control form-control-sm tooltipTarget "  @change="setOwner" style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
+                                <select v-if="is_ownerSelectShow" name="owner_id"  v-model="filterData.owner_id"  class="form-control form-control-sm tooltipTarget "  @change="setOwner" style="vertical-align: middle;max-width: 100px" :class="filterData.owner_id?'bg-warning':''">
                                     <option value="" class="text-secondary">货主 </option>
                                     <option v-for="owner in owners" :value="owner.id" class="font-weight-bold">@{{owner.name}}</option>
                                 </select>
+                                <label v-if="!is_ownerSelectShow" class="text-muted" style="vertical-align: middle;min-width: 100px">(多选)</label>
                                 <div style="position: relative;" @mouseover="isOut=true;mouseleaveOwner();" @mouseleave="isOut=false;mouseleaveOwner();">
                                     <input type="text" title="多选货主时双击选中" class="form-control form-control-sm tooltipTarget" @input="owner_seek($event)"  placeholder="定位货主" @blur="isBlur=false;blurOwner();" @focus="isOwnersBtn=true;isBlur=true;">
                                     <span v-show="isOwnersBtn" class="border"   style="position: absolute;left:0;top:30px;width:150px;max-height:100px;overflow:auto;background-color: white">
@@ -64,19 +65,25 @@
                                 </div>
                             </div>
                         </td>
+                        <td ><div class="form-inline">
+                            <input type="date" name="created_at_start" style="width: 150px" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
+                                   v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''">
+                            <input type="date" style="width: 150px" class="form-control form-control-sm tooltipTarget" name="created_at_end" title="选择显示指定日期的结束时间"
+                                   v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''"></div>
+                            </td>
                         <td >
-                            <select name="carrier_id"   v-model="filterData.carrier_id" class="form-control form-control-sm  tooltipTarget" @change="setCarrier" style="vertical-align: middle;max-width: 100px" :class="filterData.carrier_id?'bg-warning':''">
-                                <option value="" class="text-secondary">承运商 </option>
-                                @foreach($carriers as $carrier)
-                                    <option value="{{$carrier->id}}" class="font-weight-bold">{{$carrier->name}}</option>
-                                @endforeach
-                            </select></td>
-                        <td >
-                            <input type="text" title="运单号:支持15内模糊搜索与15天外精确搜索" name="waybill_number" placeholder="运单号"
-                                   class="form-control form-control-sm  tooltipTarget" v-model="filterData.waybill_number" style="vertical-align: middle;max-width: 200px" :class="filterData.waybill_number?'bg-warning':''"></td>
-                        <td  >
                             <input type="text" title="承运商单号:支持15内模糊搜索与15天外精确搜索"  name="carrier_bill" placeholder="承运商单号"
-                                   class="form-control form-control-sm  tooltipTarget" v-model="filterData.carrier_bill" style="vertical-align: middle;max-width: 200px" :class="filterData.carrier_bill?'bg-warning':''"></td>
+                                   class="form-control form-control-sm  tooltipTarget" v-model="filterData.carrier_bill" style="vertical-align: middle;max-width: 200px" :class="filterData.carrier_bill?'bg-warning':''">
+                        </td>
+                        <td >
+                            <select name="status"  v-model="filterData.status" @change="setState" class="form-control form-control-sm tooltipTarget" style="vertical-align: middle;max-width: 100px" :class="filterData.status?'bg-warning':''">
+                                <option value="" class="text-secondary">运单状态</option>
+                                <option value="未审核" class="font-weight-bold">未审核</option>
+                                <option value="已审核" class="font-weight-bold">待调度</option>
+                                <option value="待终审" class="font-weight-bold">待终审</option>
+                                <option value="已完结" class="font-weight-bold">已完结</option>
+                            </select>
+                        </td>
                         <td></td>
                     </tr>
                     <tr>
@@ -85,23 +92,23 @@
                                    class="form-control form-control-sm  tooltipTarget" v-model="filterData.wms_bill_number" style="vertical-align: middle;max-width: 200px" :class="filterData.wms_bill_number?'bg-warning':''"></td>
                         <td  style="width: 350px"><div class="form-inline">
                                 <input type="text" title="始发地:支持15内模糊搜索与15天外精确搜索" name="origination" placeholder="始发地"
-                                       class="form-control form-control-sm  tooltipTarget" v-model="filterData.origination" style="vertical-align: middle" :class="filterData.origination?'bg-warning':''">
-                                <input type="text" title="目的地:支持15内模糊搜索与15天外精确搜索" style="vertical-align: middle" placeholder="目的地"
+                                       class="form-control form-control-sm  tooltipTarget" v-model="filterData.origination" style="vertical-align: middle;width: 150px" :class="filterData.origination?'bg-warning':''">
+                                <input type="text" title="目的地:支持15内模糊搜索与15天外精确搜索" style="vertical-align: middle;width: 150px" placeholder="目的地"
                                        name="destination" class="form-control form-control-sm  tooltipTarget" v-model="filterData.destination" :class="filterData.destination?'bg-warning':''"></div></td>
-                        <td  style="width: 350px"><div class="form-inline">
-                                <input type="date" name="created_at_start" class="form-control form-control-sm tooltipTarget" title="选择显示指定日期的起始时间"
-                                       v-model="filterData.created_at_start" :class="filterData.created_at_start?'bg-warning':''">
-                                <input type="date" class="form-control form-control-sm tooltipTarget" name="created_at_end" title="选择显示指定日期的结束时间"
-                                       v-model="filterData.created_at_end" :class="filterData.created_at_end?'bg-warning':''"></div></td>
+                        <td  style="width: 280px">
+                            <input type="text" title="运单号:支持15内模糊搜索与15天外精确搜索" name="waybill_number" placeholder="运单号"
+                                   class="form-control form-control-sm  tooltipTarget" v-model="filterData.waybill_number" style="vertical-align: middle;max-width: 200px" :class="filterData.waybill_number?'bg-warning':''">
+                        </td>
                         <td>
-                            <select name="status"  v-model="filterData.status" @change="setState" class="form-control form-control-sm tooltipTarget" style="vertical-align: middle;max-width: 100px" :class="filterData.status?'bg-warning':''">
-                                <option value="" class="text-secondary">运单状态</option>
-                                <option value="未审核" class="font-weight-bold">未审核</option>
-                                <option value="已审核" class="font-weight-bold">待调度</option>
-                                <option value="待终审" class="font-weight-bold">待终审</option>
-                                <option value="已完结" class="font-weight-bold">已完结</option>
+                            <div class="form-inline">
+                            <select name="carrier_id"   v-model="filterData.carrier_id" class="form-control form-control-sm  tooltipTarget" @change="setCarrier" style="vertical-align: middle;width: 100px" :class="filterData.carrier_id?'bg-warning':''">
+                                <option value="" class="text-secondary">承运商 </option>
+                                @foreach($carriers as $carrier)
+                                    <option value="{{$carrier->id}}" class="font-weight-bold">{{$carrier->name}}</option>
+                                @endforeach
                             </select>
-                            <input hidden type="submit">
+                            <button type="submit" class="btn btn-sm btn-outline-dark w-25 ml-5">按条件搜索</button>
+                            </div>
                         </td>
                         <td></td>
                     </tr>
@@ -437,6 +444,7 @@
                 isBlur:false,
                 isOwnersBtn:false,
                 imgs:'',
+                is_ownerSelectShow:true,
             },
             computed:{
                 isBeingFilterConditions:function(){
@@ -726,13 +734,20 @@
                 },
                 //多货主查询
                 selectedOwner:function (id) {
-                    if (this.filterData.owners['_'+id]){
-                        this.$delete(this.filterData.owners,'_'+id);
-                        return;
+                    if (this.filterData.owners['_'+id]) this.$delete(this.filterData.owners,'_'+id);
+                    else this.$set(this.filterData.owners,'_'+id,id);
+                    if (Object.keys(this.filterData.owners).length===1){
+                        this.filterData.owner_id=id;
+                        if (!this.is_ownerSelectShow)this.is_ownerSelectShow=true; 
+                    }
+                    if (Object.keys(this.filterData.owners).length<1) {
+                        this.filterData.owner_id='';
+                        if (!this.is_ownerSelectShow)this.is_ownerSelectShow=true;
+                    }
+                    if (Object.keys(this.filterData.owners).length>1) {
+                        this.filterData.owner_id='';
+                        if (this.is_ownerSelectShow)this.is_ownerSelectShow=false;
                     }
-                    this.$set(this.filterData.owners,'_'+id,id);
-                    if (Object.keys(this.filterData.owners).length===1)this.filterData.owner_id=id;
-                    else this.filterData.owner_id='';
                 },
                 owner_seek:function (e) {
                     let val=e.target.value;

+ 3 - 1
resources/views/weight/package/index.blade.php

@@ -59,10 +59,12 @@
                                 </td>
                                 <td >
                                     <input type="text" title="波次号:支持15内模糊搜索与15天外精确搜索" placeholder="波次号" name="batch_number" class="form-control form-control-sm  tooltipTarget" v-model="filterData.batch_number"  :class="filterData.batch_number?'bg-warning':''" style="vertical-align: middle;max-width: 200px" ></td>
+                                <td>
+                                    <button class="btn btn-sm btn-outline-dark pull-left" type="submit">按条件搜索</button>
+                                </td>
                             </tr>
                             <tr>
                                 <td colspan="9">
-                                    <input hidden type="submit" >
                                     <span class="dropdown">
                                         <button class="btn btn-outline-dark btn-sm form-control-sm dropdown-toggle tooltipTarget" :class="[checkData.length>0?'btn-dark text-light':'']"
                                                 data-toggle="dropdown" title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">