Переглянути джерело

Merge branch 'master' into Haozi

# Conflicts:
#	app/Http/Controllers/TestController.php
haozi 5 роки тому
батько
коміт
b530c497c0

+ 53 - 0
app/Console/Commands/SyncCarrier.php

@@ -0,0 +1,53 @@
+<?php
+
+namespace App\Console\Commands;
+
+use App\Logistic;
+use App\Services\common\BatchUpdateService;
+use Illuminate\Console\Command;
+use Illuminate\Support\Facades\DB;
+
+class SyncCarrier extends Command
+{
+    /**
+     * The name and signature of the console command.
+     *
+     * @var string
+     */
+    protected $signature = 'sync:carrier';
+
+    /**
+     * The console command description.
+     *
+     * @var string
+     */
+    protected $description = 'Sync carriers every hour';
+
+    /**
+     * Create a new command instance.
+     *
+     * @return void
+     */
+    public function __construct()
+    {
+        parent::__construct();
+    }
+
+    /**
+     * Execute the console command.
+     *
+     * @return void
+     */
+    public function handle()
+    {
+        $carriers = DB::connection("oracle")->select(DB::raw("SELECT CUSTOMERID,CUSTOMER_TYPE,DESCR_C,CASE DESCR_E WHEN 'WL' THEN '物流' ELSE '快递' END AS TYPE FROM BAS_CUSTOMER WHERE CUSTOMER_TYPE = 'CA'"));
+        $logistics = Logistic::query()->whereIn("code",array_column($carriers,"customerid"))->get();
+        $changes = diff($carriers,$logistics,"code",["code"=>"customerid","name"=>"descr_c","type"=>"type"]);
+        if ($changes['attached'])Logistic::query()->insert($changes['attached']);
+        if ($changes['updated']){
+            array_unshift($changes['updated'],["code","name","type"]);
+            app(BatchUpdateService::class)->batchUpdate("logistics",$changes['updated']);
+        }
+        if ($changes["detached"])Logistic::query()->whereIn("code",$changes["detached"])->delete();
+    }
+}

+ 3 - 0
app/Console/Kernel.php

@@ -11,6 +11,7 @@ use App\Console\Commands\InventoryDailyLoggingOwner;
 use App\Console\Commands\LogExpireDelete;
 use App\Console\Commands\MakeServiceCommand;
 use App\Console\Commands\SyncBatchTask;
+use App\Console\Commands\SyncCarrier;
 use App\Console\Commands\SyncLogCacheTask;
 use App\Console\Commands\SyncOrderPackageLogisticRouteTask;
 use App\Console\Commands\SyncUserVisitMenuLogsCacheTask;
@@ -48,6 +49,7 @@ class  Kernel extends ConsoleKernel
         CreateWeightStatistic::class,
         BeforeCreateOwnerReport::class,
         CreateProcurementTotalBill::class,
+        SyncCarrier::class,
     ];
 
     /**
@@ -74,6 +76,7 @@ class  Kernel extends ConsoleKernel
         $schedule->command('clear:cancelledOrder')->everyTenMinutes();
         $schedule->command('WasSyncWmsAsnInformation')->everyMinute();
         $schedule->command('create:weightStatistic')->dailyAt("00:30");
+        $schedule->command('sync:carrier')->hourlyAt(1);
         $schedule->command('createProcurementTotalBill')->monthlyOn(1);
     }
 

+ 3 - 1
app/Http/Controllers/RejectedController.php

@@ -489,7 +489,9 @@ class RejectedController extends Controller
             'owner_id' => $request->input('owner_id'),
             'data'=> $request->input('data'),
             'created_at_start' => $request->input('created_at_start'),
-            'created_at_end' => $request->input('created_at_end')
+            'created_at_end' => $request->input('created_at_end'),
+            'uncheck_amount' => $request->input('uncheck_amount'),
+            'not_in_storage' => $request->input('not_in_storage'),
         ];
         return $searchParams;
     }

+ 1 - 2
app/Http/Controllers/TestController.php

@@ -128,6 +128,7 @@ use Carbon\CarbonPeriod;
 use ChangeColumnOrderIdToOrderIssues;
 use Doctrine\DBAL\Query\QueryBuilder;
 use Illuminate\Database\Eloquent\Builder;
+use Illuminate\Database\Eloquent\Model;
 use Illuminate\Support\Facades\Auth;
 use Illuminate\Support\Facades\Cache;
 use Illuminate\Http\Request;
@@ -300,8 +301,6 @@ class TestController extends Controller
 
     function packageT(Request $request)
     {
-        $package = Package::where('created_at', '<', '2020-07-08')->whereNotNull('logistic_number')->first();
-        $package->fetchLogistic();
     }
 
     function injectJS(Request $request)

+ 1 - 0
app/Http/Controllers/api/thirdPart/goodscan/PackageController.php

@@ -69,6 +69,7 @@ class PackageController
         if(!empty($orderPackage->order)){
             Waybill::setWeightByOrderCode($orderPackage->order->code,$orderPackage->weight);
         }
+        $orderPackage->loadMissing('measuringMachine');
         event(new WeighedEvent($orderPackage));
         dispatch(new WeightUpdateInstantBill($orderPackage));
         $response=["code"=>0,'error'=>'upload success'];

+ 13 - 3
app/Http/Controllers/api/thirdPart/haiq/StorageController.php

@@ -43,7 +43,17 @@ class StorageController
             "taskMode"      => 1,
             "bins"=>[[
                 "taskCode"  =>'t'.microtime(true),
-                "binCode"   => "IDE0005682",
+                "binCode"   => "IDE0005665",
+                "fromLocCode" => "BIN-IN1",
+                "toLocCode" => "",
+            ],[
+                "taskCode"  =>'t1'.microtime(true),
+                "binCode"   => "IDE0005656",
+                "fromLocCode" => "BIN-IN1",
+                "toLocCode" => "",
+            ],[
+                "taskCode"  =>'t2'.microtime(true),
+                "binCode"   => "IDE0005657",
                 "fromLocCode" => "BIN-IN1",
                 "toLocCode" => "",
             ],],
@@ -84,8 +94,8 @@ class StorageController
             "taskMode"      => 6,
             "bins"=>[[
                 "taskCode"  =>'t'.microtime(true),
-                "binCode"   => "IDE0000130",
-                "fromLocCode" => "HAIB2-01-03",
+                "binCode"   => "IDE0005679",
+                "fromLocCode" => "HAIB2-03-02",
                 "toLocCode" => "",
             ],],
             "groupCode"     => 'g'.microtime(true),

+ 2 - 1
app/Logistic.php

@@ -10,11 +10,12 @@ use Illuminate\Database\Eloquent\Model;
  */use App\Traits\ModelTimeFormat;
 
 use App\Traits\ModelLogChanging;
+use Illuminate\Database\Eloquent\SoftDeletes;
 
 class Logistic extends Model
 {
     use ModelLogChanging;
-
+    use SoftDeletes;
     use ModelTimeFormat;
     protected $fillable = ['name','code',"type","mobile","remark","delivery_fee"];
 

+ 1 - 1
app/OrderIssue.php

@@ -187,7 +187,7 @@ class OrderIssue extends Model
         foreach ($rejectedMap as $key => $map) {
             if (isset($map['残次']) && $map['残次'] > 0) return "差异退回";
             if (empty($orderIssueMap[$key])) return "差异退回";
-            if(isset($rejectedMap[$key]['正品']) && isset($orderIssueMap[$key]['正品'])){
+            if(isset($rejectedMap[$key]['正品']) && isset($orderIssueMap[$key])){
                 if ( $rejectedMap[$key]['正品'] < $orderIssueMap[$key]) $portion += 1;
                 if ( $rejectedMap[$key]['正品'] > $orderIssueMap[$key]) return "超量退回";                    // 超量退回
                 if ( $rejectedMap[$key]['正品'] == $orderIssueMap[$key]) $equal += 1;

+ 17 - 2
app/RejectedAnalyzeOwner.php

@@ -146,9 +146,24 @@ class RejectedAnalyzeOwner extends Model
         $sql .= ' select  distinct id_owner,0 bounce_amount,0 check_amount,count(1) in_storage_count,0 not_in_storage_count from rejected_bills  where is_loaded = 1 and deleted_at is null ';
         $sql .= $condition;
         $sql .= ') rao ';
+        $sql .= ' left join owners on owners.id = rao.id_owner and owners.deleted_at is null ';
+        $sql .= ' group by rao.id_owner';
+        $sql .= ' having owners.name is not null';
+        if(isset($array['uncheck_amount'])){
+            // 审核数为0
+            if($array['uncheck_amount'] == 0)$sql.=' and bounce_amount - check_amount in (0)  ';
+            // 审核数不为0
+            if($array['uncheck_amount'] == 1)$sql.=' and check_amount <> check_amount ';
+        }
+        if(isset($array['not_in_storage'])){
+            // 入库数为0
+
+            if($array['not_in_storage'] == 0)$sql.=' and not_in_storage_count in (0) ';
+            // 入库数不为0
+            if($array['not_in_storage'] == 1)$sql.=' and not_in_storage_count <> 0 ';
+        }
 
-        $sql .= ' left join owners on owners.id = rao.id_owner and owners.deleted_at is null';
-        $sql .= ' group by rao.id_owner having owners.name is not null order by bounce_amount desc';
+        $sql .= ' order by bounce_amount desc';
         return  $sql;
     }
 

+ 1 - 1
app/Services/BatchService.php

@@ -3,11 +3,11 @@
 namespace App\Services;
 
 use App\Batch;
+use App\Exceptions\ErrorException;
 use App\OracleActAllocationDetails;
 use App\Order;
 use App\OrderCommodity;
 use App\Owner;
-use ErrorException;
 use Exception;
 use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Http;

+ 18 - 7
app/Services/ForeignHaiRoboticsService.php

@@ -210,7 +210,16 @@ class ForeignHaiRoboticsService
         );
         LogService::log('海柔请求','putBinToStore3',
             json_encode($dataToPost));
-        return $this->controlHaiRobot($dataToPost);
+        $controlSuccess = $this->controlHaiRobot($dataToPost);
+        if($controlSuccess){
+            $this->instant($this->stationTaskMaterialBoxService,'StationTaskMaterialBoxService');
+            $this->stationTaskMaterialBoxService->set($stationTaskMaterialBox,[
+                'id' => $stationTaskMaterialBox['id'],
+                'status' => $stationTaskMaterialBox['status']='处理中',
+                'station_id' => 4,
+            ]);
+        }
+        return $controlSuccess;
     }
 
     public function taskUpdate(
@@ -247,18 +256,20 @@ class ForeignHaiRoboticsService
                         ->get()
                         ->toJson());
             }
-            ($标记已放置在库外=
+            if(($标记已放置=
                 function()use($updateEventType,$stationTaskMaterialBox){
                     if(($isPut
                             =$updateEventType)==1){
-                        $this->stationTaskMaterialBoxService->markHasTaken($stationTaskMaterialBox);
-                    }
-                })();
-            ($标记已入立架=
+                        $this->stationTaskMaterialBoxService->markHasPut($stationTaskMaterialBox);
+                        return true;
+                    }return false;
+                })())
+                    return true;
+            ($标记已取出=
                 function()use($updateEventType,$stationTaskMaterialBox){
                     if(($isGet
                             =$updateEventType)==0){
-                        $this->stationTaskMaterialBoxService->markPutStored($stationTaskMaterialBox);
+                        $this->stationTaskMaterialBoxService->markHasTaken($stationTaskMaterialBox);
                     }
                 })();
         }catch (\Exception $e){

+ 15 - 0
app/Services/StationRuleBatchService.php

@@ -11,6 +11,7 @@ use App\StationType;
 use Illuminate\Support\Collection;
 use Illuminate\Support\Facades\Cache;
 use App\Traits\ServiceAppAop;
+use Illuminate\Support\Facades\DB;
 
 
 class StationRuleBatchService
@@ -19,8 +20,11 @@ class StationRuleBatchService
     protected $modelClass=StationRuleBatch::class;
     function getByBatch(?Batch $batch): ?StationRuleBatch
     {
+        LogService::log(__METHOD__,'getByBatch','波次任务分配1.21:'.json_encode($batch));
         $batchType = $batch['type'] ?? 'null';
         $ownerId = $batch['owner_id'] ?? 'null';
+        if(!$this->isLocationOfRobot($batch))return null;
+        LogService::log(__METHOD__,'getByBatch','波次任务分配1.22:'.($this->isLocationOfRobot($batch)));
         $batch->loadMissing('stationTaskBatch');
 //        if($batch['stationTaskBatch'])return null;//? 这行有啥用?
         return Cache::remember('stationRuleBatch_batchType_'.$batchType.'_ownerId_'.$ownerId, config('cache.expirations.rarelyChange'),function()use($batch){
@@ -30,9 +34,17 @@ class StationRuleBatchService
                 && $batch['type']!='无'){
                 $builder=$builder->where('batch_type',$batch['type']);
             }
+            LogService::log(__METHOD__,'getByBatch','波次任务分配1.23:');
             return $builder->first();
         });
     }
+    function isLocationOfRobot(?Batch $batch): bool
+    {
+        if(!$batch)return false;
+        $sql = "select count(*) as count from order_commodities where location like 'IDE%' and order_id in (select id from orders where batch_id in (select id from batches where id = ?))";
+        $billDetails = DB::select(DB::raw($sql),[$batch['id']]);
+        return $billDetails[0]->count>0;
+    }
 
     function getStationType_toBeTask(Batch $batch): ?StationType{
         $stationRuleBatch=$this->getByBatch($batch);
@@ -46,14 +58,17 @@ class StationRuleBatchService
      */
     function getBatches_shouldProcess(Collection $batches): Collection
     {
+        LogService::log(__METHOD__,'shouldProcess','波次任务分配1.1:'.json_encode($batches));
         $batches_toProcess=collect();
         $batches_inTask=StationTaskBatch::query()->whereIn('batch_id',data_get($batches,'*.id'))->get();
+        LogService::log(__METHOD__,'shouldProcess','波次任务分配1.2:'.json_encode($batches_inTask));
         $batches=$batches->whereNotIn('id',data_get($batches_inTask,'*.id')??[]);
         foreach ($batches as $batch){
             $stationRuleBatch=$this->getByBatch($batch);
             if($stationRuleBatch)
                 $batches_toProcess->push($batch);
         }
+        LogService::log(__METHOD__,'shouldProcess','波次任务分配1.3:'.json_encode($batches_inTask));
         return $batches_toProcess;
     }
 }

+ 10 - 7
app/Services/StationTaskMaterialBoxService.php

@@ -102,7 +102,7 @@ class StationTaskMaterialBoxService
     }
 
 
-    function markHasTaken(StationTaskMaterialBox $stationTaskMaterialBox){
+    function markHasPut(StationTaskMaterialBox $stationTaskMaterialBox){
         $this->instant($this->stationTaskBatchService,'StationTaskBatchService');
         $this->instant($this->stationTaskCommodityService,'StationTaskCommodityService');
         $this->instant($this->stationTaskService,'StationTaskService');
@@ -121,16 +121,20 @@ class StationTaskMaterialBoxService
                     $this->stationService->broadcastBinMonitor($stationTaskMaterialBox['station_id'],$stationTaskMaterialBox['stationTask']);
                     break;
                 case '入立库':
-
+                    $this->set($stationTaskMaterialBox,[
+                        'id' => $stationTaskMaterialBox['station_id'],
+                        'status' => '完成',
+                    ]);
                     break;
-                case '入库':break;
+                case '入缓存架':break;
+                default:;
             }
         }catch (\Exception $e){
             throw new ErrorException('放置料箱出错');
         }
     }
 
-    function markPutStored($stationTaskMaterialBox){
+    function markHasTaken($stationTaskMaterialBox){
         //TODO: 标记 料箱位置(需要其字段存在)$stationTaskMaterialBox['materialBox']['position']
     }
     function processNextQueued(StationTaskMaterialBox $stationTaskMaterialBox_lastProcessed){
@@ -235,13 +239,12 @@ class StationTaskMaterialBoxService
         $stationTaskMaterialBox->load('station.stationType');
         if($isBatching=(
             $stationTaskMaterialBox['station_task_batch_id'] &&
-            $stationTaskMaterialBox['station']['stationType']['name'] == '料箱监视器')
+                $stationTaskMaterialBox['station']['stationType']['name'] == '料箱监视器')
         ){
             return '分波次';
         }
         if($isPuttingBack=(
-            !$stationTaskMaterialBox &&
-            $stationTaskMaterialBox['station']['stationType'] == '立库')
+            $stationTaskMaterialBox['station']['stationType']['name'] == '立库')
         ){
             return '入立库';
         }

+ 8 - 0
app/Traits/ServiceAppAop.php

@@ -28,6 +28,14 @@ trait ServiceAppAop
             return $query->get();
         });
     }
+    function set($target,array $kvPairs){
+        $update = $target->update($kvPairs);
+        Cache::forget($this->cachingKey($kvPairs));
+        if(isset($kvPairs['id'])){
+            Cache::forget($this->cachingKey(['id'=>$kvPairs['id']]));
+        }
+        return $update;
+    }
 
     protected function cachingKey(array $kvPairs): string
     {

+ 40 - 0
app/Utils/helpers.php

@@ -1,6 +1,7 @@
 <?php
 
 use Carbon\Carbon;
+use Illuminate\Database\Eloquent\Model;
 
 function formatExcelDate(int $timestamp)
 {
@@ -8,4 +9,43 @@ function formatExcelDate(int $timestamp)
     $today=new Carbon('1900-01-01');
     $day = $today->addDays($diff-2);
     return $day->toDateString();
+}
+
+function diff($array1,$array2,string $identification,array $mapping,bool $intactDetached = false):array
+{
+    $changes = [
+        'attached' => [], 'detached' => [], 'updated' => [],
+    ];
+    $map = [];
+    foreach ($array2 as $item){
+        if (is_array($item))$map[$item[$identification]] = $item;
+        else $map[$item->$identification] = json_decode($item,true);
+    }
+    foreach ($array1 as $item){
+        /** @var \stdClass|array|Model $item */
+        if (!is_array($item) && !is_subclass_of($item,Model::class))$item = (array)$item;
+        if (!isset($map[$item[$mapping[$identification]]])){
+            $obj = [];
+            foreach ($mapping as $column2=>$column1)$obj[$column2] = $item[$column1];
+            $changes['attached'][] = $obj;continue;
+        }
+        $sign = false;
+        $obj = [];
+        foreach ($mapping as $column2=>$column1){
+            $obj[$column2] = $item[$column1];
+            if ($map[$item[$mapping[$identification]]][$column2] != $item[$column1])$sign = true;
+        }
+        if ($sign)$changes['updated'][] = $obj;
+        unset($map[$item[$mapping[$identification]]]);
+    }
+    if ($map){
+        if ($intactDetached){
+            foreach ($map as $item){
+                $obj = [];
+                foreach ($mapping as $column2=>$column1)$obj[$column2] = $item[$column2];
+                $changes['detached'][] = $obj;
+            }
+        }else $changes['detached'][] = array_keys($map);
+    }
+    return $changes;
 }

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

@@ -0,0 +1,32 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class ChangeLogisticsAddColumnDeletedAt extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::table('logistics', function (Blueprint $table) {
+            $table->timestamp("deleted_at")->nullable();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::table('logistics', function (Blueprint $table) {
+            $table->dropColumn("deleted_at");
+        });
+    }
+}

+ 2 - 0
resources/views/maintenance/warehouse/create.blade.php

@@ -43,6 +43,7 @@
                         <div class="col-8">
                             <input id="production_capacity" type="number" step="0.01" min="0" class="form-control @error('production_capacity') is-invalid @enderror"
                                    name="production_capacity" autocomplete="off" value="{{ old('production_capacity') }}" required>
+                            <span class="text-muted">每立方需要1产能,每吨需要3产能</span>
                             @error('production_capacity')
                             <span class="invalid-feedback" role="alert">
                                 <strong>{{ $message }}</strong>
@@ -55,6 +56,7 @@
                         <div class="col-8 input-group">
                             <input id="reduced_production_capacity_coefficient" type="number" class="form-control @error('reduced_production_capacity_coefficient') is-invalid @enderror"
                                    step="1" min="0" max="100" autocomplete="off"
+                                   placeholder="当SKU的数量多到可以影响产能时,每个SKU增加百分之几的产能需求(如填5,那每个原来1产能完成的,需要105%完成)"
                                    name="reduced_production_capacity_coefficient"  value="{{ old('reduced_production_capacity_coefficient') }}" required>
                             <span class="d-block input-group-append">
                                 <span class="input-group-text font-weight-bold">%</span>

+ 3 - 1
resources/views/maintenance/warehouse/edit.blade.php

@@ -49,13 +49,14 @@
                         <div class="col-8">
                             <input id="production_capacity" type="number" step="0.01" min="0" class="form-control @error('production_capacity') is-invalid @enderror"
                                    name="production_capacity" autocomplete="off" value="{{ old('production_capacity') ?? $warehouse->production_capacity }}" required>
+                            <span class="text-muted">每立方需要1产能,每吨需要3产能</span>
                             @error('production_capacity')
                             <span class="invalid-feedback" role="alert">
                                 <strong>{{ $message }}</strong>
                             </span>
                             @enderror
                         </div>
-                    </div>
+                    </div>F
                     <div class="form-group row">
                         <label for="reduced_production_capacity_coefficient" class="col-2 col-form-label text-right">SKU减产系数</label>
                         <div class="col-8 input-group">
@@ -70,6 +71,7 @@
                                 <strong>{{ $message }}</strong>
                             </span>
                             @enderror
+                            <div class="text-muted">当SKU的数量多到可以影响产能时,每个SKU增加百分之几的产能需求(如填5,那每个原来1产能完成的,需要105%完成)</div>
                         </div>
                     </div>
                     <div class="form-group row">

+ 2 - 2
resources/views/process/create.blade.php

@@ -271,10 +271,10 @@
                 </div>
                 <div class="form-group row">
                     <label for="designate_id" class="col-3 col-form-label text-right">指定接单人</label>
-                    <select id="designate_id" class="form-control col-5" v-model="process.designate_id">
+                    <select :disabled="is_hide" id="designate_id" class="form-control col-5" v-model="process.designate_id">
                         <option v-for="user in users" :value="user.id">@{{ user.name }}</option>
                     </select>
-                    <label class="col-3"><input class="text form-control rounded-pill" placeholder="搜索人员" @input="seekUser($event)"></label>
+                    <label class="col-3" v-if="!is_hide"><input class="text form-control rounded-pill" placeholder="搜索人员" @input="seekUser($event)"></label>
                 </div>
                 <div class="form-group row">
                     <label class="col-3 col-form-label text-right" >加工备注(选填)</label>

+ 4 - 0
resources/views/rejected/search/analyze.blade.php

@@ -81,11 +81,15 @@
             mounted:function(){
                 $(".tooltipTarget").tooltip({'trigger':'hover'});
                 $('#list').removeClass('d-none');
+                let uncheck_check = [{name:'0',value:'未审核数为0'},{name:'1',value:'未审核数不为0'}];
+                let not_in_storage_check = [{name:'0',value:'未入库数为0'},{name:'1',value:'未入库数为不为0'}];
                 let data=[
                     [
                         {name:'created_at_start',type:'dateTime',tip:'选择显示指定日期的起始时间'},
                         {name:'owner_id',type:'select_multiple_select',tip:['输入关键词快速定位下拉列表,回车确定','选择要显示的客户'],
                             placeholder:['货主','定位或多选货主'],data:this.owners},
+                        {name:'uncheck_amount',type:"select",data:uncheck_check,tip:'未审核数',placeholder:'未审核数'},
+                        {name:'not_in_storage',type:"select",data:not_in_storage_check,tip:'未入库数',placeholder:'未入库数'},
                     ],[
                         {name:'created_at_end',type:'dateTime',tip:'选择显示指定日期的结束时间'},
                     ]

+ 8 - 8
resources/views/station/monitor/show.blade.php

@@ -430,19 +430,19 @@
                     deep:true,
                     handler:function(newStation){
                         let grids={
-                            single:{status:'',},
+                            single:{status:'',amount:'',},
                             half:{
-                                left:{status:'',},
-                                right:{status:'',}
+                                left:{status:'',amount:'',},
+                                right:{status:'',amount:'',}
                             },
                             quarter:{
-                                left:{top:{status:'',},bottom:{status:'',},},
-                                right:{top:{status:'',},bottom:{status:'',},},
+                                left:{top:{status:'',amount:'',},bottom:{status:'',amount:'',},},
+                                right:{top:{status:'',amount:'',},bottom:{status:'',amount:'',},},
                             },
                             sixth:{
-                                left:{top:{status:'',},bottom:{status:'',},},
-                                mid:{top:{status:'',},bottom:{status:'',},},
-                                right:{top:{status:'',},bottom:{status:'',},},
+                                left:{top:{status:'',amount:'',},bottom:{status:'',amount:'',},},
+                                mid:{top:{status:'',amount:'',},bottom:{status:'',amount:'',},},
+                                right:{top:{status:'',amount:'',},bottom:{status:'',amount:'',},},
                             },
                         };
                         if(!newStation.current_station_task||newStation.current_station_task.length===0) {

+ 120 - 2
resources/views/test.blade.php

@@ -1,4 +1,4 @@
-@extends('layouts.app')
+{{--@extends('layouts.app')
 
 @section('content')
     <div>
@@ -71,4 +71,122 @@
             </tr>
         </table>
     </div>
-@endsection
+@endsection--}}
+<html>   
+<head>   
+    <title></title>   
+    <style type="text/css">
+        .Freezing {
+            z-index: 10;
+            position: relative;
+            top: expression(this.offsetParent.scrollTop)
+        }
+        .FreezingCol {
+            z-index: 1;
+            left: expression(document.getElementById("freezingDiv").scrollLeft);
+            position: relative;
+          }   
+    </style>   
+</head>   
+<body>   
+  <br>
+div table固定列<br>
+<div id="freezingDiv" style="overflow:auto; width:400px; height:155px">   
+      <table cellspacing="0" cellpadding="4" rules="all" bordercolor="#3366CC" border="1" id="DataGrid1" style="background-color:White;border-color:#3366CC;border-width:1px;border-style:None;width:900px;border-collapse:collapse;">   
+         
+            <tr class="Freezing" style="color:#CCCCFF;background-color:#003399;font-weight:bold;">
+                    <td class="FreezingCol">ID</td>   
+                    <td class="FreezingCol">姓名</td>   
+                    <td>年龄</td>   
+                    <td>电话</td>   
+                    <td>性别</td>   
+                    <td>住址</td>   
+                </tr>   
+               
+            <tr style="color:#003399;background-color:White;">   
+                    <td class="FreezingCol">   
+                         <span>1</span>    
+                        </td>   
+                    <td class="FreezingCol">   
+                        <span>张三</span>    
+                        </td>   
+                    <td>29</td>   
+                    <td>0000000000000</td>   
+                    <td>男</td>   
+                    <td>北京</td>   
+               </tr>
+           <tr style="color:#003399;background-color:White;">   
+                    <td class="FreezingCol">   
+                           <span>1</span>    
+                        </td>   
+                    <td class="FreezingCol">   
+                          <span>李四</span>    
+                        </td>   
+                    <td>29</td>   
+                    <td>0000000000000</td>   
+                    <td>男</td>   
+                    <td>上海</td>   
+               </tr>
+           <tr style="color:#003399;background-color:White;">   
+                    <td class="FreezingCol">   
+                           <span>1</span>    
+                        </td>   
+                    <td class="FreezingCol">   
+                          <span>王五</span>    
+                        </td>   
+                    <td>50</td>   
+                    <td>0000000000000</td>   
+                    <td>男</td>   
+                    <td>上海</td>   
+               </tr>
+           <tr style="color:#003399;background-color:White;">   
+                    <td class="FreezingCol">   
+                           <span>1</span>    
+                        </td>   
+                    <td class="FreezingCol">   
+                          <span>赵六</span>    
+                        </td>   
+                    <td>29</td>   
+                    <td>0000000000000</td>   
+                    <td>男</td>   
+                    <td>上海</td>   
+               </tr> 
+           <tr style="color:#003399;background-color:White;">   
+                    <td class="FreezingCol">   
+                           <span>1</span>    
+                        </td>   
+                    <td class="FreezingCol">   
+                          <span>赵七</span>    
+                        </td>   
+                    <td>29</td>   
+                    <td>0000000000000</td>   
+                    <td>男</td>   
+                    <td>上海</td>   
+               </tr>        
+          </table>   
+</div>   
+
+
+
+
+<br>
+cellspacing =0<br>
+<table width="200" cellspacing="0" border="1" bordercolor="#000000">
+    <tr> 
+        <td>sd </td>
+        <td>sd </td>
+        <td>sd </td>
+    </tr>
+</table>
+<br>
+cellspacing =8<br>
+<table width="200" cellspacing="8" border="1" bordercolor="#000000">
+    <tr>
+        <td>sd </td>
+        <td> dd</td>
+        <td>dd </td>
+    </tr>
+</table>
+  
+</body>   
+</html>

+ 2 - 2
resources/views/transport/discharge/task/_table.blade.php

@@ -23,13 +23,13 @@
                     <span class="badge badge-pill badge-secondary">未指定服务商</span>
                 </template>
                 <template v-else-if="dischargeTask.status===1">
-                    <span class="badge badge-pill badge-warning">任务未进行</span>
+                    <span class="badge badge-pill badge-warning">任务已指定</span>
                 </template>
                 <template v-else-if="dischargeTask.status===2">
                     <span class="badge badge-pill badge-success">进行中</span>
                 </template>
                 <template v-else-if="dischargeTask.status===3">
-                    <span class="badge badge-pill badge-light">完成</span>
+                    <span class="badge badge-pill badge-success">完成</span>
                 </template>
             </td>
             <td>@{{ dischargeTask.created_at }}</td>

+ 1 - 1
resources/views/transport/discharge/task/index.blade.php

@@ -66,7 +66,7 @@
                 status: [
                     {name: 0, value: '创建'},
                     {name: 1, value: '接单'},
-                    {name: 2, value: '作业中'},
+                    // {name: 2, value: '作业中'},
                     {name: 3, value: '完成'},
                 ],
                 isUpdate: false,