Przeglądaj źródła

更新对账单,部分模块增加批量筛选功能

hu hao 5 lat temu
rodzic
commit
76b486404d

+ 1 - 0
app/Console/Commands/CreateProcurementTotalBill.php

@@ -51,6 +51,7 @@ class CreateProcurementTotalBill extends Command
             ->get();
         $totalBill=[];
         foreach ($procurementCheckSheets as $procurementCheckSheet){
+            if ($procurementCheckSheet->account_payable<1) continue;
             $totalBill[]=[
                 'counting_month'=>$date.'-01',
                 'supplier_id'=>$procurementCheckSheet->supplier_id,

+ 6 - 1
app/Filters/OrderPackageFilters.php

@@ -35,7 +35,12 @@ class OrderPackageFilters
 
     private function logistic_number($logistic_number)
     {
-        $this->queryBuilder->where('logistic_number', $logistic_number);
+        if (strpos($logistic_number, ',') || strpos($logistic_number, ',') || strpos($logistic_number, ' ')) {
+            $arr = array_filter(preg_split('/[,, ]+/is', $logistic_number));
+            $this->queryBuilder->whereIn('logistic_number',$arr);
+        } else {
+            $this->queryBuilder->where('logistic_number','like',$logistic_number."%");
+        }
     }
     private function exception_type($exception_type)
     {

+ 34 - 0
app/Http/Controllers/TestController.php

@@ -1266,4 +1266,38 @@ where purch.islower=1 and deliver.id>'.$id);
         }
         ProcurementCheckSheet::query()->insert($insert_);
     }
+    public function updateProcurementCheckSheet()
+    {
+        $pro=ProcurementDeliverie::query()->find(515);
+        $pro->update([
+            'signed_at'=>'2021-04-02',
+            'created_at'=>'2021-04-02 08:34:51',
+            'updated_at'=>'2021-04-02 08:34:51',
+        ]);
+        $pro=$pro->loadMissing('procurement');
+        ProcurementCheckSheet::query()->create([
+            'procurement_delivery_id'=>$pro['id'],
+            'account_payable'=>$pro['procurement']['cost_price']*$pro['receipt_amount'],
+            'created_at'=>$pro['created_at'],
+            'updated_at'=>$pro['updated_at'],
+        ]);
+        $collect=ProcurementDeliverie::query()->with('procurement')->where('id','>=',517)
+            ->where('id','<=',528)->get();
+        $insert=[];
+
+        foreach ($collect as $item){
+            if ($item['receipt_amount']==0){
+                $receipt_amount=$item['amount'];
+            }else{
+                $receipt_amount=$item['receipt_amount'];
+            }
+            $insert[]=[
+                'procurement_delivery_id'=>$item['id'],
+                'account_payable'=>$item['procurement']['cost_price']*$receipt_amount,
+                'created_at'=>$item['created_at'],
+                'updated_at'=>$item['updated_at'],
+            ];
+        }
+        ProcurementCheckSheet::query()->insert($insert);
+    }
 }

+ 1 - 1
app/ProcurementDeliverie.php

@@ -17,7 +17,7 @@ class ProcurementDeliverie extends Model
     use ModelTimeFormat;
 
     protected $fillable=[
-        'procurement_id','amount', 'initiator','status','signer','signed_at','receipt_amount'
+        'procurement_id','amount', 'initiator','status','signer','signed_at','receipt_amount','created_at','updated_at'
     ];
     const status=[
         0=>'待送货',

+ 26 - 13
app/Services/AllInventoryService.php

@@ -54,23 +54,18 @@ class AllInventoryService
         $sql.=' ,sku.Descr_C,lot.LotAtt05,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' , storeStatus.QTY, storeStatus.QtyAllocated,storeStatus.CUSTOMERID,storeStatus.ADDTIME  ';
         $sql.=' )result where 1=1 ';
-        if ($TOLocation)$sql .= " and 库位 like '".$TOLocation."' ";
-        if ($SKU)$sql.=" and 产品编码 like '".$SKU."' ";
-        if ($LotAtt05)$sql .=" and 属性仓 like '".$LotAtt05."' ";
+//        if ($TOLocation)$sql .= " and 库位 like '".$TOLocation."' ";
+//        if ($SKU)$sql.=" and 产品编码 like '".$SKU."' ";
+//        if ($LotAtt05)$sql .=" and 属性仓 like '".$LotAtt05."' ";
+        if ($TOLocation)$sql=$this->searchWay($sql,$TOLocation,"库位");
+        if ($SKU)$sql=$this->searchWay($sql,$SKU,"产品编码");
+        if ($LotAtt05)$sql=$this->searchWay($sql,$LotAtt05,"属性仓");
         if ($date_start)$sql.=" and 创建时间 > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end)$sql.=" and 创建时间 < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
         if ($LotAtt02_start)$sql.=" and 失效日期 >='".$LotAtt02_start." 00:00:00' ";
         if ($LotAtt02_end)$sql.=" and 失效日期 <='".$LotAtt02_end." 23:59:59' ";
-//        if ($customerid){
-//            $sql .= ' and 客户 in (';
-//            $arr = explode(',',$customerid);
-//            foreach ($arr as $index => $data){
-//                if ($index != 0)$sql .= ',';
-//                $sql .= "'".$data."'";
-//            }
-//            $sql .= ') ';
-//        }
-        if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
+//        if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
+        if ($ALTERNATE_SKU1)$sql=$this->searchWay($sql,$ALTERNATE_SKU1,"产品条码");
         if ($page&&$paginate)$sql.="  and ROWNUM<='".$page*$paginate."'";
         $sql.=' )  ';
         if ($page&&$paginate)$sql.="  where rn>'".($page-1)*$paginate."'";
@@ -80,4 +75,22 @@ class AllInventoryService
     public function paginate(array $params){
         return DB::connection('oracle')->select(DB::raw($this->getSql($params,$params['page'] ?? 1, $params['paginate'] ?? 50)));
     }
+    private function searchWay($sql,$condition,$column)
+    {
+        if ($condition){
+            if (strpos($condition, ',') || strpos($condition, ',') || strpos($condition, ' ')) {
+                $arr = array_filter(preg_split('/[,, ]+/is', $condition));
+                $sql .= ' and '.$column.' in (';
+                foreach ($arr as $index => $arr){
+                    if ($index != 0)$sql .= ',';
+                    $sql .= "'".$arr."'";
+                }
+                $sql .= ') ';
+                unset($condition);
+            } else {
+                $sql .= " and $column like '".$condition."' ";
+            }
+        }
+        return $sql;
+    }
 }

+ 1 - 1
app/Services/InventoryCompareService.php

@@ -149,7 +149,7 @@ class InventoryCompareService
             'owner_id' => ['multi' => ','],
             'date_start' => ['alias' => 'created_at' , 'startDate' => ' 00:00:00'],
             'date_end' => ['alias' => 'created_at' , 'endDate' => ' 23:59:59'],
-            'mission_code' => ['timeLimit' => 15],
+            'mission_code' => ['batch' => '','timeLimit' => 15],
             'custom_location' => ['like' => '','timeLimit' => 15],
             'id' => ['multi' => ','],
         ];

+ 40 - 10
app/Services/InventoryService.php

@@ -38,8 +38,10 @@ class InventoryService
         $sql.=" from ACT_Transaction_Log where TransactionType='PA' ";
         if ($date_start) $sql.=" and addtime > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end) $sql.=" and addtime < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
-        if ($TOLocation)$sql .= " and TOLocation like '".$TOLocation."' ";
-        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+//        if ($TOLocation)$sql .= " and TOLocation like '".$TOLocation."' ";
+//        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+        if ($TOLocation)$sql=$this->searchWay($sql,$TOLocation,"TOLocation");
+        if ($SKU)$sql=$this->searchWay($sql,$SKU,"FMSKU");
         if ($customerid){
             $sql .= ' and TOCustomerID in (';
             $arr = explode(',',$customerid);
@@ -62,8 +64,10 @@ class InventoryService
         $sql.=" from ACT_Transaction_Log where TransactionType='SO' ";
         if ($date_start) $sql.=" and addtime > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end) $sql.=" and addtime < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
-        if ($TOLocation)$sql .= " and FMLOCATION like '".$TOLocation."' ";
-        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+//        if ($TOLocation)$sql .= " and FMLOCATION like '".$TOLocation."' ";
+//        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+        if ($TOLocation)$sql=$this->searchWay($sql,$TOLocation,"FMLOCATION");
+        if ($SKU)$sql=$this->searchWay($sql,$SKU,"FMSKU");
         if ($customerid){
             $sql .= ' and FMCUSTOMERID in (';
             $arr = explode(',',$customerid);
@@ -86,8 +90,11 @@ class InventoryService
         $sql.=" from ACT_Transaction_Log  where TransactionType='MV' ";
         if ($date_start) $sql.=" and addtime > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end) $sql.=" and addtime < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
-        if ($TOLocation)$sql .= " and FMLocation like '".$TOLocation."' ";
-        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+//        if ($TOLocation)$sql .= " and FMLocation like '".$TOLocation."' ";
+//        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+        if ($TOLocation)$sql=$this->searchWay($sql,$TOLocation,"FMLocation");
+        if ($SKU)$sql=$this->searchWay($sql,$SKU,"FMSKU");
+
         if ($customerid){
             $sql .= ' and FMCUSTOMERID in (';
             $arr = explode(',',$customerid);
@@ -110,8 +117,11 @@ class InventoryService
         $sql.=" from ACT_Transaction_Log where TransactionType='MV' ";
         if ($date_start) $sql.=" and addtime > to_date('".$date_start." 00:00:00','yyyy-mm-dd hh24:mi:ss') ";
         if ($date_end) $sql.=" and addtime < to_date('".$date_end." 23:59:59','yyyy-mm-dd hh24:mi:ss') ";
-        if ($TOLocation)$sql .= " and TOLocation like '".$TOLocation."' ";
-        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+//        if ($TOLocation)$sql .= " and TOLocation like '".$TOLocation."' ";
+//        if ($SKU)$sql.=" and FMSKU like '".$SKU."' ";
+        if ($TOLocation)$sql=$this->searchWay($sql,$TOLocation,"TOLocation");
+        if ($SKU)$sql=$this->searchWay($sql,$SKU,"FMSKU");
+
         if ($customerid){
             $sql .= ' and TOCustomerID in (';
             $arr = explode(',',$customerid);
@@ -139,15 +149,35 @@ class InventoryService
         $sql.=' ,sku.Descr_C,FMLotNum,lot.LotAtt05,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' , storeStatus.QTY, storeStatus.QtyAllocated,stockLog.客户  ';
         $sql.=' )result where 1=1 ';
-        if ($LotAtt05)$sql .=" and 属性仓 like '".$LotAtt05."' ";
+//        if ($LotAtt05)$sql .=" and 属性仓 like '".$LotAtt05."' ";
+        if ($LotAtt05)$sql=$this->searchWay($sql,$LotAtt05,"属性仓");
         if ($LotAtt02_start)$sql.=" and 失效日期 >='".$LotAtt02_start." 00:00:00' ";
         if ($LotAtt02_end)$sql.=" and 失效日期 <='".$LotAtt02_end." 23:59:59' ";
-        if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
+//        if ($ALTERNATE_SKU1)$sql.=" and 产品条码 like '".$ALTERNATE_SKU1."' ";
+        if ($ALTERNATE_SKU1)$sql=$this->searchWay($sql,$ALTERNATE_SKU1,"产品条码");
         if ($page&&$paginate)$sql.="  and ROWNUM<='".$page*$paginate."'";
         $sql.=' )  ';
         if ($page&&$paginate)$sql.="  where rn>'".($page-1)*$paginate."'";
         return $sql;
     }
+    private function searchWay($sql,$condition,$column)
+    {
+        if ($condition){
+            if (strpos($condition, ',') || strpos($condition, ',') || strpos($condition, ' ')) {
+                $arr = array_filter(preg_split('/[,, ]+/is', $condition));
+                $sql .= ' and '.$column.' in (';
+                foreach ($arr as $index => $arr){
+                    if ($index != 0)$sql .= ',';
+                    $sql .= "'".$arr."'";
+                }
+                $sql .= ') ';
+                unset($condition);
+            } else {
+                $sql .= " and $column like '".$condition."' ";
+            }
+        }
+        return $sql;
+    }
 
     public function paginate(array $params)
     {

+ 1 - 1
app/Services/PackageService.php

@@ -37,7 +37,7 @@ class PackageService
             Arr::forget($params, 'is_weighed');
         }
         $columnQueryRules=[
-            'batch_number' => ['like' => ''],
+            'batch_number' => ['batch' => ''],
             'weighed_at_start' => ['alias' => 'weighed_at', 'startDate' => ':00'],
             'weighed_at_end' => ['alias' => 'weighed_at','endDate' => ":59"],
             'id' => ['multi' => ','],

+ 13 - 3
app/Services/ProcessService.php

@@ -29,7 +29,12 @@ class ProcessService
             $processes=$processes->whereHas('processesContents',function ($query)use($barcode){
                 $query->whereHas('commodity',function ($builder)use($barcode){
                     $builder->whereHas('barcodes',function ($builder)use($barcode){
-                        $builder->where('code','like',$barcode);
+                        if (strpos($barcode, ',') || strpos($barcode, ',') || strpos($barcode, ' ')) {
+                            $arr = array_filter(preg_split('/[,, ]+/is', $barcode));
+                            $builder->whereIn('code',$arr);
+                        } else {
+                            $builder->where('code','like',$barcode);
+                        }
                     });
                 });
             });
@@ -38,7 +43,12 @@ class ProcessService
         if ($params['wms_code'] ?? false){
             $wms_code=$params['wms_code'];
             $processes=$processes->whereHas('processesContents',function ($builder)use ($wms_code){
-                $builder->where('wms_code','like',$wms_code);
+                if (strpos($wms_code, ',') || strpos($wms_code, ',') || strpos($wms_code, ' ')) {
+                    $arr = array_filter(preg_split('/[,, ]+/is', $wms_code));
+                    $builder->whereIn('wms_code',$arr);
+                } else {
+                    $builder->where('wms_code','like',$wms_code);
+                }
             });
             unset($params['wms_code']);
         }
@@ -48,7 +58,7 @@ class ProcessService
         $columnQueryRules=[
             'date_start' => ['alias' => 'created_at' , 'startDate' => ' 00:00:00'],
             'date_end' => ['alias' => 'created_at' , 'endDate' => ' 23:59:59'],
-            'code' => ['like' => ''],
+            'code' => ['batch' => ''],
             'owner_id' => ['multi' => ','],
             'id' => ['multi' => ','],
         ];

+ 6 - 1
app/Services/ProcessStatisticService.php

@@ -25,7 +25,12 @@ class ProcessStatisticService
         if ($params["code"] ?? false){
             $code=$params["code"];
             $query=$query->whereHas('process',function (Builder $builder)use($code){
-                $builder->where('code','like',$code."%");
+                if (strpos($code, ',') || strpos($code, ',') || strpos($code, ' ')) {
+                    $arr = array_filter(preg_split('/[,, ]+/is', $code));
+                    $builder->whereIn('code',$arr);
+                } else {
+                    $builder->where('code','like',$code."%");
+                }
             });
             unset($params["code"]);
         }

+ 13 - 7
app/Services/RejectedService.php

@@ -22,7 +22,7 @@ class RejectedService
     function __construct(){
         $this->instant($this->cacheService,'CacheService');
     }
-    private function conditionQuery(array $param)
+    private function    conditionQuery(array $param)
     {
         $user = Auth::user();
         $rejectedBills = RejectedBill::query()->with('user','owner', 'logistic', 'items.quality','orderIssueRejectedBill:logistic_number_return')
@@ -32,11 +32,11 @@ class RejectedService
             'created_at_start' => ['alias' => 'created_at', 'startDate' => ' 00:00:00'],
             'created_at_end' => ['alias' => 'created_at', 'endDate' => ' 23:59:59'],
             'owner_id' => ['alias' => 'id_owner', 'multi' => ','],
-            'order_number' => ['like' => ''],
-            'remark' => ['like' => '','timeLimit'=>15],
-            'logistic_number' => ['like' => ''],
-            'mobile_sender' => ['like' => ''],
-            'checked_numbers' => ['like' => ''],
+            'order_number' => ['batch' => ''],
+            'remark' => ['batch' => '','timeLimit'=>15],
+            'logistic_number' => ['batch' => ''],
+            'mobile_sender' => ['batch' => ''],
+            'checked_numbers' => ['batch' => ''],
             'id' => ['multi' => ','],
         ];
         if ($param['id_quality_label'] ?? false) {
@@ -72,7 +72,13 @@ class RejectedService
         if ($param["barcode_goods"] ?? false) {
             $barcode_goods = $param["barcode_goods"];
             $rejectedBills->whereHas('items', function ($query) use ($barcode_goods) {
-                $query->where('barcode_goods', 'like', trim($barcode_goods) . '%');
+                if (strpos($barcode_goods, ',') || strpos($barcode_goods, ',') || strpos($barcode_goods, ' ')) {
+                    $arr = array_filter(preg_split('/[,, ]+/is', $barcode_goods));
+                    $query->whereIn('barcode_goods', $arr);
+                    unset($barcode_goods);
+                } else {
+                    $query->where('barcode_goods','like', trim($barcode_goods).'%');
+                }
             });
             unset($param["barcode_goods"]);
         }

+ 2 - 1
app/Services/StoreCheckingReceiveService.php

@@ -22,7 +22,8 @@ class StoreCheckingReceiveService
             'created_at_start' => ['alias' => 'created_at' , 'startDate' => ' 00:00:00'],
             'created_at_end' => ['alias' => 'created_at' , 'endDate' => ' 23:59:59'],
             'owner_id' => ['multi' => ','],
-            'id' => ['multi' => ',']
+            'id' => ['multi' => ','],
+            'asn' => ['batch' => ',']
         ];
         return app(QueryService::class)->query($params,$query,$columnQueryRules);
     }

+ 2 - 2
app/Services/StoreService.php

@@ -28,8 +28,8 @@ class StoreService
     {
         $stores = Store::query()->with(['storeItems.store', 'warehouse', 'owner'])->where('is_fast_stored', '无')->orderBy('id', 'DESC');
         $columnQueryRules = [
-            'asn_code' => ['like' => ''],
-            'remark' => ['like' => '','timeLimit' => 15],
+            'asn_code' => ['batch' => ''],
+            'remark' => ['batch' => '','timeLimit' => 15],
             'created_at_start' => ['alias' => 'created_at', 'startDate' => ' 00:00:00'],
             'created_at_end' => ['alias' => 'created_at', 'endDate' => ' 23:59:59'],
             'owner_id' => ['multi' => ','],

+ 50 - 30
app/Services/WaybillService.php

@@ -58,49 +58,69 @@ class WaybillService
         if ($param["recipient"] ?? false){
             $recipient = $param["recipient"];
             $waybills->where(function ($query)use($recipient){
-                /** @var Builder $query */
-                $query->where("waybills.recipient","like",$recipient."%")->orWhereHas("order",function ($query)use($recipient){
+                if (strpos($recipient, ',') || strpos($recipient, ',') || strpos($recipient, ' ')) {
+                    $arr = array_filter(preg_split('/[,, ]+/is', $recipient));
                     /** @var Builder $query */
-                    $query->where("consignee_name",'like',$recipient."%");
-                });
+                    $query->whereIn("waybills.recipient",$arr)->orWhereHas("order",function ($query)use($arr){
+                        /** @var Builder $query */
+                        $query->whereIn("consignee_name",$arr);
+                    });
+                } else {
+                    /** @var Builder $query */
+                    $query->where("waybills.recipient","like",$recipient."%")->orWhereHas("order",function ($query)use($recipient){
+                        /** @var Builder $query */
+                        $query->where("consignee_name",'like',$recipient."%");
+                    });
+                }
+
             });
             unset($param["recipient"]);
         }
         if ($param["recipient_mobile"] ?? false){
             $recipientMobile = $param["recipient_mobile"];
             $waybills->where(function ($query)use($recipientMobile){
-                /** @var Builder $query */
-                $query->where("waybills.recipient_mobile","like",$recipientMobile."%")->orWhereHas("order",function ($query)use($recipientMobile){
+                if (strpos($recipientMobile, ',') || strpos($recipientMobile, ',') || strpos($recipientMobile, ' ')) {
+                    $arr = array_filter(preg_split('/[,, ]+/is', $recipientMobile));
                     /** @var Builder $query */
-                    $query->where("consignee_phone",'like',$recipientMobile."%");
-                });
+                    $query->whereIn("waybills.recipient_mobile",$arr)->orWhereHas("order",function ($query)use($arr){
+                        /** @var Builder $query */
+                        $query->whereIn("consignee_phone",$arr);
+                    });
+                } else {
+                    /** @var Builder $query */
+                    $query->where("waybills.recipient_mobile","like",$recipientMobile."%")->orWhereHas("order",function ($query)use($recipientMobile){
+                        /** @var Builder $query */
+                        $query->where("consignee_phone",'like',$recipientMobile."%");
+                    });
+                }
+
             });
             unset($param["recipient_mobile"]);
         }
 
-        if($param['carrier_bill'] ?? false){    // 承运商单号
-            $this->searchWay($waybills,$param['carrier_bill'],'waybills.carrier_bill');
-            unset($param['carrier_bill']);
-        }
-        if($param['waybill_number'] ?? false) { // 运单号
-            $this->searchWay($waybills,$param['waybill_number'],'waybills.waybill_number');
-            unset($param['waybill_number']);
-        }
-        if($param['source_bill'] ?? false) {// 上游单号
-            $this->searchWay($waybills,$param['source_bill'],'waybills.source_bill');
-            unset($param['source_bill']);
-        }
-        if($param['wms_bill_number']?? false){ // wms单号
-            $this->searchWay($waybills,$param['wms_bill_number'],'waybills.wms_bill_number');
-            unset($param['wms_bill_number']);
-        }
+//        if($param['carrier_bill'] ?? false){    // 承运商单号
+//            $this->searchWay($waybills,$param['carrier_bill'],'waybills.carrier_bill');
+//            unset($param['carrier_bill']);
+//        }
+//        if($param['waybill_number'] ?? false) { // 运单号
+//            $this->searchWay($waybills,$param['waybill_number'],'waybills.waybill_number');
+//            unset($param['waybill_number']);
+//        }
+//        if($param['source_bill'] ?? false) {// 上游单号
+//            $this->searchWay($waybills,$param['source_bill'],'waybills.source_bill');
+//            unset($param['source_bill']);
+//        }
+//        if($param['wms_bill_number']?? false){ // wms单号
+//            $this->searchWay($waybills,$param['wms_bill_number'],'waybills.wms_bill_number');
+//            unset($param['wms_bill_number']);
+//        }
         $columnQueryRules=[
-//            'waybill_number' => ['like' => ''],
-//            'carrier_bill' => ['like' => ''],
-//            'wms_bill_number' => ['like' => ''],
-            'origination' => ['like' => ''],
-//            'source_bill' => ['like' => ''],
-            'car_owner_info' => ['like' => ''],
+            'waybill_number' => ['batch' => ''],
+            'carrier_bill' => ['batch' => ''],
+            'wms_bill_number' => ['batch' => ''],
+            'origination' => ['batch' => ''],
+            'source_bill' => ['batch' => ''],
+            'car_owner_info' => ['batch' => ''],
             'created_at_start' => ['alias' => 'created_at' , 'startDate' => ':00'],
             'created_at_end' => ['alias' => 'created_at' , 'endDate' => ':59'],
             'uriType' => ['alias' => 'type'],

+ 9 - 0
app/Services/common/QueryService.php

@@ -71,6 +71,15 @@ class QueryService
                     $query = $query->whereIn($tableName.$column,explode($value,$params[$param]));
                     $isExecute = true;
                 }
+                if ($rule === 'batch'){
+                    if (strpos($value.$params[$param].$value, ',') || strpos($value.$params[$param].$value, ',') || strpos($value.$params[$param].$value, ' ')) {
+                        $arr = array_filter(preg_split('/[,, ]+/is', $value.$params[$param].$value));
+                        $query = $query->whereIn($tableName.$column, $arr);
+                    } else {
+                        $query = $query->where($tableName.$column,'like',$value.$params[$param].$value.'%');
+                    }
+                    $isExecute = true;
+                }
             }
             if (!$isExecute) $query = $query->where($tableName.$column,$params[$param]);
         }

+ 4 - 4
resources/views/inventory/statement/changeInventory.blade.php

@@ -80,16 +80,16 @@
                     [
                         {name:['date_start','range'],type:'dateTime_select',tip:['选择创建日期的起始时间','查询内容的日期范围'],placeholder:['','查询内容的日期范围'],data: this.date
                             ,killings:[['range'],['date_start']]},
-                        {name:'TOLocation',type:'input',tip:'库位:糊模查找需要在左边打上%符号',placeholder: '库位'},
-                        {name:'LotAtt05',type:'input',tip:'属性仓:糊模查找需要在左边打上%符号',placeholder: '属性仓'},
+                        {name:'TOLocation',type:'input',tip:'可支持多库位,糊模查找需要在左边打上%符号',placeholder: '库位'},
+                        {name:'LotAtt05',type:'input',tip:'可支持多属性仓,糊模查找需要在左边打上%符号',placeholder: '属性仓'},
                         {name:'LotAtt02_start',type:'dateTime',tip:'选择显示失效日期的起始时间'},
                         {name:'customerid',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
                             placeholder:['货主','定位或多选货主'],data:this.owners},
                     ],
                     [
                         {name:'date_end',type:'dateTime',tip:'选择创建日期的结束时间',killings:['range']},
-                        {name:'SKU',type:'input',tip:'产品编码:糊模查找需要在左边打上%符号',placeholder: '产品编码'},
-                        {name:'ALTERNATE_SKU1',type:'input',tip:'产品条码:糊模查找需要在左边打上%符号',placeholder: '产品条码'},
+                        {name:'SKU',type:'input',tip:'可支持多产品编码,糊模查找需要在左边打上%符号',placeholder: '产品编码'},
+                        {name:'ALTERNATE_SKU1',type:'input',tip:'可支持多产品条码,糊模查找需要在左边打上%符号',placeholder: '产品条码'},
                         {name:'LotAtt02_end',type:'dateTime',tip:'选择显示失效日期的结束时间'},
                     ],
                 ];

+ 1 - 1
resources/views/inventory/statement/inventoryCompare.blade.php

@@ -152,7 +152,7 @@
                 let data=[
                     [
                         {name:'date_start',type:'dateTime',tip:'选择创建日期的起始时间'},
-                        {name:'mission_code',type:'input',tip:'任务号:糊模查找需要在左边打上%符号',placeholder: '任务号'},
+                        {name:'mission_code',type:'input',tip:'可支持多任务号,糊模查找需要在右边打上%符号',placeholder: '任务号'},
                         {
                             name: 'owner_id', type: 'select_multiple_select', tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的客户'],
                             placeholder: ['货主', '定位或多选货主'], data: this.owners

+ 1 - 1
resources/views/package/logistic/index.blade.php

@@ -130,7 +130,7 @@
                 let data = [
                     [
                         /*"","","","","","","","","","",""*/
-                        {name: 'logistic_number', type: 'input', tip: '可支持多快递单号,糊模查找需要在边打上%符号', placeholder: '快递单号'},
+                        {name: 'logistic_number', type: 'input', tip: '可支持多快递单号,糊模查找需要在边打上%符号', placeholder: '快递单号'},
                         {
                             name: 'status',
                             type: 'select',

+ 2 - 2
resources/views/package/weigh/index.blade.php

@@ -98,11 +98,11 @@
                     {name:'weighed_at_start',type:'time',tip:['选择显示称重日期的起始时间','选择显示称重日期的起始时间']},
                     {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
                         placeholder:['货主','定位或多选货主'],data:_this.owners},
-                    {name:'logistic_number',type:'input',tip:'可支持多快递单号,糊模查找需要在边打上%符号',placeholder:'快递单号'},
+                    {name:'logistic_number',type:'input',tip:'可支持多快递单号,糊模查找需要在边打上%符号',placeholder:'快递单号'},
                     {name:'is_weighed',type:'checkbox',tip:'是否已称重', data: [{name: 'true', value: '是否已称重'}]}
                 ],[
                     {name:'weighed_at_end',type:'time',tip:['选择显示称重日期的结束时间','选择显示称重日期的结束时间']},
-                    {name:'batch_number',type:'input',tip:'波次号:可在两侧增加百分号(%)进行模糊搜索',placeholder:'波次号'}
+                    {name:'batch_number',type:'input',tip:'可支持多波次号,糊模查找需要在右边打上%符号',placeholder:'波次号'}
                 ]];
 
                 _this.form = new query({

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

@@ -541,13 +541,13 @@
                             name: 'owner_id', type: 'select_multiple_select', tip: ['输入关键词快速定位下拉列表,回车确定', '选择要显示的客户'],
                             placeholder: ['货主', '定位或多选货主'], data: this.owners
                         },
-                        {name: 'wms_code', type: 'input', tip: '单据号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '单据号'},
+                        {name: 'wms_code', type: 'input', tip: '可支持多单据号,模糊搜索可在两侧增加百分号(%)进行', placeholder: '单据号'},
                         {name: 'status', type: 'select', placeholder: '状态', data: this.status},
                     ],
                     [
                         {name: 'date_end', type: 'dateTime', tip: '选择显示指定日期的结束时间'},
-                        {name: 'commodity_barcode', type: 'input', tip: '商品条码:可在两侧增加百分号(%)进行模糊搜索', placeholder: '商品条码'},
-                        {name: 'code', type: 'input', tip: '任务号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '任务号'},
+                        {name: 'commodity_barcode', type: 'input', tip: '可支持多商品条码,模糊搜索可在两侧增加百分号(%)进行', placeholder: '商品条码'},
+                        {name: 'code', type: 'input', tip: '可支持多任务号,模糊搜索可在两侧增加百分号(%)进行', placeholder: '任务号'},
                         {name: 'is_accomplish', type: 'checkbox', data: [{name: 'sign', value: '显示交接完成的记录'}]},
                     ],
                 ];

+ 1 - 1
resources/views/process/statistic.blade.php

@@ -95,7 +95,7 @@
                     ],
                     [
                         {name: 'started_at_end', type: 'dateTime', tip: '选择显示指定日期的结束时间'},
-                        {name: 'code', type: 'input', tip: '任务号:可在两侧增加百分号(%)进行模糊搜索', placeholder: '任务号'},
+                        {name: 'code', type: 'input', tip: '可支持多任务号,模糊搜索可在两侧增加百分号(%)进行', placeholder: '任务号'},
                         {name: 'status', type: 'select', placeholder: '状态', data: this.status},
                     ],
                 ];

+ 5 - 5
resources/views/rejected/search/general.blade.php

@@ -203,18 +203,18 @@
                         {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
                         {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
                             placeholder:['货主','定位或多选货主'],data:this.owners},
-                        {name:'order_number',type:'input',tip:'客户单号:可在两侧增加百分号(%)进行模糊搜索',placeholder:'客户单号'},
-                        {name:'logistic_number_return',type:'input',tip:'退回单号:可在两侧增加百分号(%)进行模糊搜索',placeholder:'退回单号'},
-                        {name:'logistic_number',type:'input',tip:'原单单号:可在两侧增加百分号(%)进行模糊搜索',placeholder:'原单单号'},
+                        {name:'order_number',type:'input',tip:'可支持多客户单号,糊模查找需要在右边打上%符号',placeholder:'客户单号'},
+                        {name:'logistic_number_return',type:'input',tip:'可支持多退回单号,糊模查找需要在右边打上%符号',placeholder:'退回单号'},
+                        {name:'logistic_number',type:'input',tip:'可支持多原单单号,糊模查找需要在右边打上%符号',placeholder:'原单单号'},
                         {name:'is_checked',type:'select',placeholder: '是否审核',data:[{name:1,value:'已审核'},{name:0,value:'未审核'}]},
                         {name:'id_logistic_return',type:'select',placeholder: '快递名称',data:this.logistics},
                         {name:'remark',type:'input',tip:'退单备注:默认查询15天以内记录信息',placeholder: '退单备注'},
                     ],[
                         {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
-                        {name:'barcode_goods',type:'input',tip:'商品条码:可模糊匹配右边未填完的部分,按回车提交',placeholder:'商品条码'},
+                        {name:'barcode_goods',type:'input',tip:'可支持多商品条码,糊模查找需要在右边打上%符号',placeholder:'商品条码'},
                         {name:'id_quality_label',type:'select',tip:'是否正品:正品仅显示全部是正品的退单,但残次显示的是包含有残次的退单',placeholder: '是否正品',data:this.qualityLabels},
                         {name:'mobile_sender',type:'input',tip:'寄件人手机:输入完成敲回车提交',placeholder:'寄件人手机'},
-                        {name:'checked_numbers',type:'input',tip:'审核批次号:支持右位留空的模糊搜索',placeholder:'审核批次号'},
+                        {name:'checked_numbers',type:'input',tip:'可支持多审核批次号,糊模查找需要在右边打上%符号',placeholder:'审核批次号'},
                         {name:'is_loaded',type:'select',placeholder: '是否入库',data:[{name:1,value:'是'},{name:0,value:'否'},
                                 {name:'null',value:'无需入库'},{name:2,value:'待推单'},{name:4,value:'待确认'},{name:3,value:'交互异常'}]},
                         {name:'is_issue',type:'select',data:[{name:'true',value:'有'},{name:'false',value:'无'}],tip:'问题件',placeholder:'问题件'}