Просмотр исходного кода

Merge branch 'zzd' into yang-package

zhouzhendong 4 лет назад
Родитель
Сommit
07985b4738

+ 45 - 3
app/Console/Commands/AccordingToOwnersManualBack.php

@@ -2,7 +2,12 @@
 
 namespace App\Console\Commands;
 
+use App\OracleDOCOrderHeader;
+use App\Owner;
+use App\ValueStore;
+use Carbon\Carbon;
 use Illuminate\Console\Command;
+use Illuminate\Database\Eloquent\HigherOrderBuilderProxy;
 
 class AccordingToOwnersManualBack extends Command
 {
@@ -32,11 +37,48 @@ class AccordingToOwnersManualBack extends Command
 
     /**
      * Execute the console command.
-     *
-     * @return int
      */
     public function handle()
     {
-        return 0;
+        $ownerCodes=Owner::query()->where('is_manual_back',1)->pluck('code');
+        $last_order_manual_back_at=$this->getOrderManualBackAt();
+        $now=Carbon::now()->toDateTimeString();
+        OracleDOCOrderHeader::query()
+            ->whereIn('sostatus',['40','50','60','61'])
+            ->where('edittime','>=',$last_order_manual_back_at)
+            ->where('edittime','<=',$now)
+            ->whereNotNull('soreference5')
+            ->where('manualflag','N')
+            ->whereIn('customerid',$ownerCodes) //指定货主
+            ->where('releasestatus','!=','H')
+            ->update(['manualflag'=>'Y','edittime'=>$now]);
+        $this->setOrderManualBackAt();
+    }
+
+    /**
+     * @return HigherOrderBuilderProxy|mixed|null
+     * 获取订单上次自动回传时间
+     */
+    private function getOrderManualBackAt()
+    {
+        $val = ValueStore::query()
+            ->select("value")
+            ->where("name", "last_order_manual_back_at")
+            ->lockForUpdate()
+            ->first();
+        if (!$val) $val = ValueStore::query()
+            ->create(["name" => "last_order_manual_back_at",'value'=>Carbon::now()->toDateTimeString()]);
+        return $val->value ?? null;
+    }
+
+    /**
+     * 设置订单上次自动回传时间
+     */
+    private function setOrderManualBackAt()
+    {
+        ValueStore::query()
+            ->select("value")
+            ->where("name", "last_order_manual_back_at")
+            ->update(["value" => Carbon::now()->toDateTimeString()]);
     }
 }

+ 1 - 0
app/Console/Kernel.php

@@ -82,6 +82,7 @@ class  Kernel extends ConsoleKernel
         $schedule->command('createProcurementTotalBill')->monthlyOn(1);
         $schedule->command('orderCountingRecordTask')->dailyAt("1:00");
         //$schedule->command('check:cacheRack')->everyMinute();
+        $schedule->command('AccordingToOwnersManualBack')->everyThirtyMinutes();
     }
 
     /**

+ 7 - 1
app/Filters/OrderIssueFilters.php

@@ -67,7 +67,8 @@ class OrderIssueFilters
         'user_owner_group',
         'archive_at_start',
         'archive_at_end',
-        'result_explain'
+        'result_explain',
+        'is_intercept'
     ];
     protected $array_filter;
     protected $params = [];
@@ -455,4 +456,9 @@ class OrderIssueFilters
     public function result_explain($result_explain){
         $this->queryBuilder->where('order_issues.result_explain','like',"%{$result_explain}%");
     }
+
+    public function is_intercept($is_intercept)
+    {
+        $this->queryBuilder->where('order_issues.is_intercept',1);
+    }
 }

+ 14 - 0
app/Http/Controllers/OwnerController.php

@@ -222,4 +222,18 @@ class OwnerController extends Controller
         if ($request->has("customer_id"))$params["customer_id"] = $request->input("customer_id");
         return ["success"=>true,"data"=>app("OwnerService")->get($params,null,false)];
     }
+
+    /**
+     * @param Request $request
+     * @return array
+     * 设置货主是否自动回传订单
+     */
+    public function changeManualBackType(Request $request): array
+    {
+        if (!Gate::allows('货主-编辑')) return ["success"=>false,"data"=>"无权操作!"];
+        $id=$request->input('id');
+        $is_manual_back=$request->input('isManualBack');
+        $owner=app("OwnerService")->changeManualBackStatus($id,$is_manual_back);
+        return ["success"=>true,"data"=>$owner];
+    }
 }

+ 3 - 64
app/Http/Controllers/TestController.php

@@ -72,6 +72,7 @@ use Decimal\Decimal;
 use Doctrine\DBAL\Exception;
 use Firebase\JWT\JWT;
 use Illuminate\Database\Eloquent\Collection;
+use Illuminate\Database\Eloquent\HigherOrderBuilderProxy;
 use Illuminate\Foundation\Http\FormRequest;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Cache;
@@ -103,73 +104,11 @@ class TestController extends Controller
         return call_user_func([$this, $method], $request);
     }
 
-    private function valFormat($val):?string
+    public function test()
     {
-        if ($val!==null){
-            $ret = date("Y-m-d H:i:s",strtotime($val))===(string)$val;
-            if ($ret)$val = "to_date('".$val."','yyyy-mm-dd hh24:mi:ss')";
-            else $val = "'".$val."'";
-        }else $val = "null";
-        return $val;
-    }
 
-    public function test1($task,$amount){
-        DB::connection("oracle")->beginTransaction();
-        try {
-            $columns = '';
-            $values = '';
-            foreach ($task as $key => $val) {
-                if (Str::upper($key) == 'TASKID_SEQUENCE') {
-                    $taskMax = DB::connection("oracle")->selectOne(DB::raw("select MAX(TASKID_SEQUENCE) maxseq from TSK_TASKLISTS where taskid = ?"), [$task->taskid]);
-                    $val = $taskMax->maxseq + 1;
-                }
-                if (Str::upper($key) == 'FMQTY' || Str::upper($key) == 'FMQTY_EACH'
-                    || Str::upper($key) == 'PLANTOQTY' || Str::upper($key) == 'PLANTOQTY_EACH') {
-                    $val -= $amount;
-                    $task->$key = $amount;
-                }
-                $columns .= $key . ",";
-                $values .= $this->valFormat($val) . ",";
-            }
-            $columns = mb_substr($columns, 0, -1);
-            $values = mb_substr($values, 0, -1);
-            $sql = <<<sql
-    INSERT INTO TSK_TASKLISTS({$columns}) VALUES({$values})
-sql;
-            dd($sql);
-        } catch (\Exception $e) {
-            dd($e);
-        }
-    }
 
-    public function test()
-    {
-        $a = "2021-09-13 00:00:00";
-        dd(mb_substr($a,0,10));
-        $models = app("MaterialBoxModelService")->getModelSortedByOwner(null);
-        foreach ($models as $model){
-            $box = app("MaterialBoxService")->getAnEmptyBox($model,[],2);
-            dd($box);
-            if ($box)return $box;
-        }
-        dd();
-        TaskTransaction::query()->where("id",">=",280)->delete();
-        /*$a= new StorageService();
-        $a->clearTask(["HAIB1-01-01"]);
-        $task = StationTaskMaterialBox::query()->find(90233);
-        $station = Station::query()->find(11);
-        $foreignHaiRoboticsService = new ForeignHaiRoboticsService();
-        $foreignHaiRoboticsService->putBinToStore_fromCacheShelf($task, $station);
-        dd(1);*/
-        /*$batchService = new BatchService();
-        $batches = Batch::query()->where("id",171829)->get();
-        $batchService->assignTasks($batches);
-        dd();*/
-        /*TaskTransaction::query()->where("id",">=",277)->delete();
-        StationTaskMaterialBox::query()->whereIn("id",[89685,89686,89687])->delete();
-        app("CacheShelfService")->_stationCacheLightOff("HAIB1-01-01");//灭灯
-        app("CacheShelfService")->_stationCacheLightOff("HAIB1-02-01");//灭灯
-        dd(1);*/
+
         Station::query()->where("station_type_id", 5)->update(["status" => 1]);
         Cache::forget("CACHE_SHELF_AVAILABLE");
         $station = ["HAIB1-01-01", "HAIB1-02-01"];

+ 5 - 0
app/Owner.php

@@ -41,6 +41,7 @@ class Owner extends Model
         'model_sequence',       //调箱序列(优先级匹配)
         'is_check_asn',          //是否校验ASN(收货时检查此项)
         'owner_group_id',        // 所属组别
+        'is_manual_back',        // 是否开启货主订单一键回传
     ];
     //relevance说明 0:仓储 1:作业 2:快递 3:物流 4:直发 5:系统 存储示例:["0","1"]存在仓储与作业计费
     protected $casts = [
@@ -55,6 +56,10 @@ class Owner extends Model
         0 => "否",
         1 => "是"
     ];
+    const IS_MANUAL_BACK=[
+        0 => "否",
+        1 => "是"
+    ];
 
     public static function filterAuthorities(){
         $user=Auth::user();

+ 16 - 0
app/Services/MaterialBoxService.php

@@ -164,4 +164,20 @@ sql;
         }
         return array(rtrim($boxCodes,","),$map);
     }
+
+    /**
+     * 检查料箱规范
+     *
+     * @param string|null $code
+     *
+     * @return bool
+     */
+    public function checkBoxNorm(?string $code):bool
+    {
+        if (!$code)return false;
+        foreach (config("haiRou.box.prefix") as $prefix){
+            if (substr($code,0,strlen($prefix))==$prefix)return true;
+        }
+        return false;
+    }
 }

+ 8 - 0
app/Services/OwnerService.php

@@ -526,4 +526,12 @@ sql;
         if ($money===null)return $taxRate->value;
         return $money*($taxRate->value/100);
     }
+
+    public function changeManualBackStatus($id,$isManual)
+    {
+        $owner=Owner::query()->find($id);
+        if ($isManual==0)$owner->update(['is_manual_back'=>1]);
+        else $owner->update(['is_manual_back'=>0]);
+        return $owner;
+    }
 }

+ 1 - 0
app/Services/StationTaskMaterialBoxService.php

@@ -118,6 +118,7 @@ class StationTaskMaterialBoxService
         //$orderCommodities=$orderCommodities->sortBy('commodity_id');//按商品排序后,出货可以同商品挨在一起
         foreach ($orderCommodities as $orderCommodity){
             $station=$this->stationService->getStation_byType($stationType['name']);
+            if (!$this->materialBoxService->checkBoxNorm($orderCommodity['location']))continue;
             $materialBox=$this->materialBoxService->firstOrCreate(['code' => $orderCommodity['location']]);
             if(in_array($materialBox['id'],$materialBoxIds_used))continue;
             $stationMaterialBoxes_toCreate->push([

+ 44 - 42
composer.lock

@@ -356,16 +356,16 @@
         },
         {
             "name": "doctrine/dbal",
-            "version": "2.13.2",
+            "version": "2.13.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/doctrine/dbal.git",
-                "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4"
+                "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/doctrine/dbal/zipball/8dd39d2ead4409ce652fd4f02621060f009ea5e4",
-                "reference": "8dd39d2ead4409ce652fd4f02621060f009ea5e4",
+                "url": "https://api.github.com/repos/doctrine/dbal/zipball/0d7adf4cadfee6f70850e5b163e6cdd706417838",
+                "reference": "0d7adf4cadfee6f70850e5b163e6cdd706417838",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -383,13 +383,14 @@
             },
             "require-dev": {
                 "doctrine/coding-standard": "9.0.0",
-                "jetbrains/phpstorm-stubs": "2020.2",
-                "phpstan/phpstan": "0.12.81",
+                "jetbrains/phpstorm-stubs": "2021.1",
+                "phpstan/phpstan": "0.12.96",
                 "phpunit/phpunit": "^7.5.20|^8.5|9.5.5",
+                "psalm/plugin-phpunit": "0.16.1",
                 "squizlabs/php_codesniffer": "3.6.0",
                 "symfony/cache": "^4.4",
                 "symfony/console": "^2.0.5|^3.0|^4.0|^5.0",
-                "vimeo/psalm": "4.6.4"
+                "vimeo/psalm": "4.10.0"
             },
             "suggest": {
                 "symfony/console": "For helpful console commands such as SQL execution and import of files."
@@ -450,7 +451,7 @@
             ],
             "support": {
                 "issues": "https://github.com/doctrine/dbal/issues",
-                "source": "https://github.com/doctrine/dbal/tree/2.13.2"
+                "source": "https://github.com/doctrine/dbal/tree/2.13.3"
             },
             "funding": [
                 {
@@ -466,7 +467,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-06-18T21:48:39+00:00"
+            "time": "2021-09-12T19:11:48+00:00"
         },
         {
             "name": "doctrine/deprecations",
@@ -1091,16 +1092,16 @@
         },
         {
             "name": "facade/flare-client-php",
-            "version": "1.8.1",
+            "version": "1.9.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/facade/flare-client-php.git",
-                "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f"
+                "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/facade/flare-client-php/zipball/47b639dc02bcfdfc4ebb83de703856fa01e35f5f",
-                "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f",
+                "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed",
+                "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1150,7 +1151,7 @@
             ],
             "support": {
                 "issues": "https://github.com/facade/flare-client-php/issues",
-                "source": "https://github.com/facade/flare-client-php/tree/1.8.1"
+                "source": "https://github.com/facade/flare-client-php/tree/1.9.1"
             },
             "funding": [
                 {
@@ -1158,20 +1159,20 @@
                     "type": "github"
                 }
             ],
-            "time": "2021-05-31T19:23:29+00:00"
+            "time": "2021-09-13T12:16:46+00:00"
         },
         {
             "name": "facade/ignition",
-            "version": "2.12.0",
+            "version": "2.13.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/facade/ignition.git",
-                "reference": "74dcc32a2895a126d1e5f2cd3bbab499cac66db1"
+                "reference": "e3f49bef7b4165fa4b8a9dc579e7b63fa06aef78"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/facade/ignition/zipball/74dcc32a2895a126d1e5f2cd3bbab499cac66db1",
-                "reference": "74dcc32a2895a126d1e5f2cd3bbab499cac66db1",
+                "url": "https://api.github.com/repos/facade/ignition/zipball/e3f49bef7b4165fa4b8a9dc579e7b63fa06aef78",
+                "reference": "e3f49bef7b4165fa4b8a9dc579e7b63fa06aef78",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -1183,7 +1184,7 @@
             "require": {
                 "ext-json": "*",
                 "ext-mbstring": "*",
-                "facade/flare-client-php": "^1.6",
+                "facade/flare-client-php": "^1.9.1",
                 "facade/ignition-contracts": "^1.0.2",
                 "illuminate/support": "^7.0|^8.0",
                 "monolog/monolog": "^2.0",
@@ -1240,7 +1241,7 @@
                 "issues": "https://github.com/facade/ignition/issues",
                 "source": "https://github.com/facade/ignition"
             },
-            "time": "2021-08-24T09:53:54+00:00"
+            "time": "2021-09-13T13:01:30+00:00"
         },
         {
             "name": "facade/ignition-contracts",
@@ -3021,16 +3022,16 @@
         },
         {
             "name": "nesbot/carbon",
-            "version": "2.52.0",
+            "version": "2.53.1",
             "source": {
                 "type": "git",
                 "url": "https://github.com/briannesbitt/Carbon.git",
-                "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe"
+                "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/369c0e2737c56a0f39c946dd261855255a6fccbe",
-                "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe",
+                "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045",
+                "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -3048,7 +3049,7 @@
             },
             "require-dev": {
                 "doctrine/orm": "^2.7",
-                "friendsofphp/php-cs-fixer": "^2.14 || ^3.0",
+                "friendsofphp/php-cs-fixer": "^3.0",
                 "kylekatarnls/multi-tester": "^2.0",
                 "phpmd/phpmd": "^2.9",
                 "phpstan/extension-installer": "^1.0",
@@ -3117,7 +3118,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2021-08-14T19:10:52+00:00"
+            "time": "2021-09-06T09:29:23+00:00"
         },
         {
             "name": "nikic/php-parser",
@@ -8407,16 +8408,16 @@
         },
         {
             "name": "mockery/mockery",
-            "version": "1.4.3",
+            "version": "1.4.4",
             "source": {
                 "type": "git",
                 "url": "https://github.com/mockery/mockery.git",
-                "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea"
+                "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea",
-                "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea",
+                "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
+                "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -8479,9 +8480,9 @@
             ],
             "support": {
                 "issues": "https://github.com/mockery/mockery/issues",
-                "source": "https://github.com/mockery/mockery/tree/1.4.3"
+                "source": "https://github.com/mockery/mockery/tree/1.4.4"
             },
-            "time": "2021-02-24T09:51:49+00:00"
+            "time": "2021-09-13T15:28:59+00:00"
         },
         {
             "name": "myclabs/deep-copy",
@@ -8942,16 +8943,16 @@
         },
         {
             "name": "phpspec/prophecy",
-            "version": "1.13.0",
+            "version": "1.14.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/phpspec/prophecy.git",
-                "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea"
+                "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea",
-                "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea",
+                "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
+                "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e",
                 "shasum": "",
                 "mirrors": [
                     {
@@ -8962,19 +8963,19 @@
             },
             "require": {
                 "doctrine/instantiator": "^1.2",
-                "php": "^7.2 || ~8.0, <8.1",
+                "php": "^7.2 || ~8.0, <8.2",
                 "phpdocumentor/reflection-docblock": "^5.2",
                 "sebastian/comparator": "^3.0 || ^4.0",
                 "sebastian/recursion-context": "^3.0 || ^4.0"
             },
             "require-dev": {
-                "phpspec/phpspec": "^6.0",
+                "phpspec/phpspec": "^6.0 || ^7.0",
                 "phpunit/phpunit": "^8.0 || ^9.0"
             },
             "type": "library",
             "extra": {
                 "branch-alias": {
-                    "dev-master": "1.11.x-dev"
+                    "dev-master": "1.x-dev"
                 }
             },
             "autoload": {
@@ -9009,9 +9010,9 @@
             ],
             "support": {
                 "issues": "https://github.com/phpspec/prophecy/issues",
-                "source": "https://github.com/phpspec/prophecy/tree/1.13.0"
+                "source": "https://github.com/phpspec/prophecy/tree/1.14.0"
             },
-            "time": "2021-03-17T13:42:18+00:00"
+            "time": "2021-09-10T09:02:12+00:00"
         },
         {
             "name": "phpunit/php-code-coverage",
@@ -10127,6 +10128,7 @@
                     "type": "github"
                 }
             ],
+            "abandoned": true,
             "time": "2020-11-30T07:30:19+00:00"
         },
         {

+ 4 - 0
config/haiRou.php

@@ -12,4 +12,8 @@ return [
         /* outbound waiting time/second */
         "outBinAwait" => 60,
     ],
+
+    "box" => [
+        "prefix" => ["IDE"],
+    ],
 ];

+ 1 - 1
config/stores.php

@@ -9,6 +9,6 @@ return [
         "宝时" => "BAOSHI",
     ],
     "types" => [
-        'THRK','DBRK','QTRK','HHRK','CGRK'
+        'THRK','DBRK','QTRK','HHRK','CGRK',"F32"
     ]
 ];

+ 32 - 0
database/migrations/2021_09_08_153619_change_owners_table_add_column_is_manual_back.php

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class ChangeOwnersTableAddColumnIsManualBack extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('owners', function (Blueprint $table) {
+            $table->tinyInteger("is_manual_back")->default(0)->comment("是否开启订单一键回传");
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('owners', function (Blueprint $table) {
+            $table->dropColumn("is_manual_back");
+        });
+    }
+}

+ 41 - 12
resources/views/maintenance/owner/index.blade.php

@@ -12,18 +12,23 @@
                 <span class="mb-1 btn btn-sm btn-outline-secondary tooltipTarget" @click="syncOwners">同步货主</span>
                 <table class="table table-striped table-sm table-hover">
                     <tr>
-                        <th>ID</th>
-                        <th>货主编码</th>
-                        <th>货主名</th>
-                        <th>创建时间</th>
-                        <th>操作</th>
+                        <th class="text-center">ID</th>
+                        <th class="text-center">货主编码</th>
+                        <th class="text-center">货主名</th>
+                        <th class="text-center">创建时间</th>
+                        <th class="text-center">订单自动回传</th>
+                        <th class="text-center">操作</th>
                     </tr>
                     <tr v-for="(owner,i) in owners" @click="selectTr===i+1?selectTr=0:selectTr=i+1" :class="selectTr===i+1?'focusing' : ''">
-                        <td class="text-muted">@{{owner.id}}</td>
-                        <td>@{{owner.code}}</td>
-                        <td>@{{owner.name}}</td>
-                        <td class="text-muted">@{{owner.created_at}}</td>
-                        <td>
+                        <td class="text-muted text-center">@{{owner.id}}</td>
+                        <td class="text-center">@{{owner.code}}</td>
+                        <td class="text-center">@{{owner.name}}</td>
+                        <td class="text-muted text-center">@{{owner.created_at}}</td>
+                        <td class="text-center">
+                            <span class="btn btn-sm btn-outline-secondary" @click="changeManualBackType(owner.id,owner.is_manual_back)">
+                                @{{is_manual_back_type[owner.is_manual_back]}}</span>
+                        </td>
+                        <td class="text-center">
                             @can('货主-编辑')
                             <button class="btn btn-sm btn-outline-primary" @click="edit(owner.id)">改</button> @endcan
                             @can('货主-删除')
@@ -45,10 +50,11 @@
             data:{
                 owners:[
                     @foreach( $owners as $owner )
-                    {id:'{{$owner->id}}',code:'{{$owner->code}}',name:'{{$owner->name}}',group:'{{$owner->ownerGroup->name??''}}',created_at:'{{$owner->created_at}}'},
+                    {id:'{{$owner->id}}',code:'{{$owner->code}}',name:'{{$owner->name}}',is_manual_back:'{{$owner->is_manual_back}}',group:'{{$owner->ownerGroup->name??''}}',created_at:'{{$owner->created_at}}'},
                     @endforeach
                 ],
-                selectTr:0
+                selectTr:0,
+                is_manual_back_type:{!! json_encode(\App\Owner::IS_MANUAL_BACK,JSON_UNESCAPED_UNICODE) !!},
             },
             mounted:function(){
                 let data = [
@@ -108,6 +114,29 @@
                         tempTip.show('同步货主失败,网络链接错误!'+err);
                     })
                 },
+                changeManualBackType(id,isManualBack){
+                    console.log(isManualBack)
+                    let url = '{{url('maintenance/owner/changeManualBackType')}}';
+                    window.axios.post(url, {id:id,isManualBack:isManualBack})
+                        .then(res => {
+                            if (res.data.success) {
+                                this.owners.forEach(function (owner){
+                                     if (owner.id==res.data.data.id){
+                                         owner.is_manual_back=res.data.data.is_manual_back;
+                                     }
+                                })
+                                window.tempTip.setDuration(3000);
+                                window.tempTip.showSuccess('设置回传成功!');
+                                this.$forceUpdate();
+                                return;
+                            }
+                            window.tempTip.setDuration(3000);
+                            window.tempTip.show('设置回传失败!');
+                        }).catch(err => {
+                        window.tempTip.setDuration(3000);
+                        window.tempTip.show("网络错误:" + err);
+                    })
+                },
             }
         });
     </script>

+ 1 - 0
resources/views/order/issue/index.blade.php

@@ -1217,6 +1217,7 @@
                         {name: 'archive_at_end', type: 'dateTime', tip: '归档结束日期'},
                             @endcannot
                         {name: 'is_handle', type: 'checkbox', tip: '是否已处理', data: [{name: 'ture', value: '已解决'}]},
+                        {name: 'is_intercept', type: 'checkbox', tip: '是否已拦截', data: [{name: 'ture', value: '已拦截'}]},
                     ]
                 ];
                 this.form = new query({

+ 30 - 1
resources/views/store/blindReceive/index.blade.php

@@ -15,6 +15,7 @@
                                 <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='regular'">常规:可输入效期,相同条码记录不会合并</p>
                                 <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='increasing'">逐一扫描:处理单一重复商品,每扫一次对应隔口总数量自动递增,扫到不同条码会提示</p>
                                 <p class="text-muted" style="font-size: 0.5em" v-if="inputMode=='multiIncreasing'">边扫边分:处理多种商品,自动将扫到的不同条码数量递增到各自隔口号</p>
+                                <p class="text-muted" style="font-size: 0.5em" v-if="inputMode==='sweepModel'">狂扫模式:无间断扫描条码</p>
                                 <ul class="nav nav-tabs mb-4 mt-n3">
                                     <li class="nav-item"><a href="#" class="nav-link" :class="inputMode=='regular'?'active':''"
                                                             @click="inputMode='regular';changeToManualInputAmount();cleanInputs();inputting.fromIncreasing=false">常规</a></li>
@@ -22,6 +23,8 @@
                                                             @click="inputMode='increasing';changeToScanInputAmount();cleanInputs();inputting.fromIncreasing=true;">逐一扫描</a></li>
                                     <li class="nav-item"><a href="#" class="nav-link" :class="inputMode=='multiIncreasing'?'active':''"
                                                             @click="inputMode='multiIncreasing';changeToScanInputAmount();cleanInputs();inputting.fromIncreasing=true">边扫边分</a></li>
+                                    <li class="nav-item"><a href="#" class="nav-link" :class="inputMode==='sweepModel'?'active':''"
+                                                            @click="inputMode='sweepModel';changeToScanInputAmount();cleanInputs();inputting.fromIncreasing=true">狂扫模式</a></li>
                                 </ul>
                             </div>
                             <div class="col-6">
@@ -50,8 +53,13 @@
                                     </div>
                                     <input type="text" class="form-control mb-2" v-model="inputting.unique_code" @focusin="focusOutDocument" @focusout="focusDocument" @keyup="oninputEnter">
                                 </div>
+                                <div v-if="inputMode==='sweepModel'" class="mt-5">
+                                    <label class="text-left font-weight-bold">已扫数量</label>
+                                    <input type="number" id="amount" class="form-control mt-0" placeholder="" :disabled="status.amountDisable"
+                                           v-model="inputting.amount" style='height: 40px;font-size: 1.6em;color:blue;font-weight: bolder;padding: 3px;text-align: center'>
+                                </div>
                             </div>
-                            <div class="col-6">
+                            <div class="col-6" v-if="inputMode!=='sweepModel'">
                                 <div class="card-title" id="amountLabel">
                                     手动输入数量:
                                 </div>
@@ -221,10 +229,31 @@
                             switch(data.inputMode){
                                 case 'increasing': data.commitGoodsOnIncreasingMode();break;
                                 case 'multiIncreasing': data.commitGoodsOnMultiIncreasingMode();break;
+                                case 'sweepModel': data.commitGoodsOnSweepModel();break;
                             }
                         }
                     });
                 },
+                commitGoodsOnSweepModel(){
+                    let repeatedBarcode=this.repeatedIncreasingBarcodeFromSaved();
+                    if(!repeatedBarcode){
+                        this.focusOutDocument();
+                        this.alertVibrate();
+                        this.inputting.amount=1;
+                        this.goodses.unshift(JSON.parse(JSON.stringify(this.inputting)));
+                        window.tempTip.setDuration(500);
+                        window.tempTip.showSuccess('保存成功');
+                        this.focusDocument();
+                        this.audioDing();
+                    }else{
+                        repeatedBarcode.amount++;
+                        this.inputting.amount=repeatedBarcode.amount;
+                        window.tempTip.setDuration(500);
+                        window.tempTip.showSuccess(repeatedBarcode.amount);
+                        this.focusDocument();
+                        this.audioDing();
+                    }
+                },
                 commitGoodsOnIncreasingMode: function () {
                     let data = this;
                     function doIt(){

+ 1 - 0
routes/web.php

@@ -129,6 +129,7 @@ Route::group(['middleware'=>'auth'],function ($route){
             Route::post("apiStore","OwnerController@apiStore");
             Route::get('recycle','OwnerController@recycle');
             Route::post('restoreSelected', 'OwnerController@restoreSelected');
+            Route::post('changeManualBackType', 'OwnerController@changeManualBackType');
         });
         /** 教程 */
         Route::group(['prefix'=>'tutorial'],function(){