Explorar el Código

修改生成盘点任务

haozi hace 5 años
padre
commit
28dcf27b8b

+ 4 - 4
app/Services/InventoryAccountService.php

@@ -64,7 +64,7 @@ class InventoryAccountService
     //动盘查询
     public function conditionPortStock($date_start,$date_end,$ownerId,$location,$barcode){
         if (!$ownerId) return null;
-        $descr_c=Owner::where('id',$ownerId)->value('name');
+        $code=Owner::where('id',$ownerId)->value('code');
         $sql='select * from (select result.*,rownum rn from (';
         $sql.=' select customer.Descr_C as 货主,stockLog.客户 客户, 库位, sku.SKU 产品编码, sku.ALTERNATE_SKU1 产品条码1, sku.ALTERNATE_SKU2 产品条码2, sku.ALTERNATE_SKU3 产品条码3, ';
         $sql.=' sku.Descr_C 商品名称, MAX(lot.LotAtt05) 属性仓, lot.LotAtt08 质量状态, lot.LotAtt02 失效日期, ';
@@ -100,7 +100,7 @@ class InventoryAccountService
         $sql.=' ,sku.Descr_C,FMLotNum,lot.LotAtt01,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' , storeStatus.QTY, storeStatus.QtyAllocated,stockLog.客户  ';
         $sql.=' )result where 1=1 ';
-        if ($descr_c)$sql.=" and 货主 = '".$descr_c."' ";
+        if ($code)$sql.=" and 客户 = '".$code."' ";
 //        if ($location)$sql.=" and 库位 like '".$location."%' ";
         if ($location){
             $arr=array_filter(preg_split('/[,, ]+/is', $location));
@@ -125,7 +125,7 @@ class InventoryAccountService
     }
     //全盘查询
     private function conditionTotalStock($ownerId,$location,$barcode){
-        $descr_c=Owner::where('id',$ownerId)->value('name');
+        $code=Owner::where('id',$ownerId)->value('code');
         $sql='select * from (select result.* from (';
         $sql.=' select customer.Descr_C as 货主,storeStatus.CUSTOMERID 客户,storeStatus.LocationID 库位, sku.SKU 产品编码, sku.ALTERNATE_SKU1 产品条码1, sku.ALTERNATE_SKU2 产品条码2, sku.ALTERNATE_SKU3 产品条码3, ';
         $sql.=' sku.Descr_C 商品名称, MAX(lot.LotAtt05) 属性仓, lot.LotAtt08 质量状态, lot.LotAtt02 失效日期, ';
@@ -139,7 +139,7 @@ class InventoryAccountService
         $sql.=' ,sku.Descr_C,lot.LotAtt08,lot.LotAtt02,lot.LotAtt04 ';
         $sql.=' ,storeStatus.CUSTOMERID,lot.LotAtt01 ';
         $sql.=' )result where 1=1 ';
-        if ($descr_c)$sql.=" and 货主 = '".$descr_c."' ";
+        if ($code)$sql.=" and 客户 = '".$code."' ";
         if ($location){
             $arr=array_filter(preg_split('/[,, ]+/is', $location));
             if (count($arr)==1){

+ 1 - 1
resources/views/layouts/app.blade.php

@@ -14,7 +14,7 @@
 </head>
 <body>
 <div id="app">
-    <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm" style="padding: 0;" >
+    <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">
         <div class="container-fluid">
             <a class="navbar-brand" href="{{ url('/') }}" title="宝时 Warehouse Assistance System" style="vertical-align: text-bottom">
                 <img src="{{asset('icon/logo100b.png')}}" alt="宝时 Warehouse Assistance System" height="30" >