LD před 5 roky
rodič
revize
ff562b35c7

+ 85 - 0
app/Http/Controllers/StationTypeBinMonitorController.php

@@ -0,0 +1,85 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use App\StationTypeBinMonitor;
+use Illuminate\Http\Request;
+
+class StationTypeBinMonitorController extends Controller
+{
+    /**
+     * Display a listing of the resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function index()
+    {
+        //
+    }
+
+    /**
+     * Show the form for creating a new resource.
+     *
+     * @return \Illuminate\Http\Response
+     */
+    public function create()
+    {
+        //
+    }
+
+    /**
+     * Store a newly created resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @return \Illuminate\Http\Response
+     */
+    public function store(Request $request)
+    {
+        //
+    }
+
+    /**
+     * Display the specified resource.
+     *
+     * @param  \App\StationTypeBinMonitor  $stationTypeBinMonitor
+     * @return \Illuminate\Http\Response
+     */
+    public function show(StationTypeBinMonitor $stationTypeBinMonitor)
+    {
+        //
+    }
+
+    /**
+     * Show the form for editing the specified resource.
+     *
+     * @param  \App\StationTypeBinMonitor  $stationTypeBinMonitor
+     * @return \Illuminate\Http\Response
+     */
+    public function edit(StationTypeBinMonitor $stationTypeBinMonitor)
+    {
+        //
+    }
+
+    /**
+     * Update the specified resource in storage.
+     *
+     * @param  \Illuminate\Http\Request  $request
+     * @param  \App\StationTypeBinMonitor  $stationTypeBinMonitor
+     * @return \Illuminate\Http\Response
+     */
+    public function update(Request $request, StationTypeBinMonitor $stationTypeBinMonitor)
+    {
+        //
+    }
+
+    /**
+     * Remove the specified resource from storage.
+     *
+     * @param  \App\StationTypeBinMonitor  $stationTypeBinMonitor
+     * @return \Illuminate\Http\Response
+     */
+    public function destroy(StationTypeBinMonitor $stationTypeBinMonitor)
+    {
+        //
+    }
+}

+ 2 - 1
app/Services/StationService.php

@@ -39,7 +39,8 @@ class StationService
         //$stationTask->stationCommodities
         //$batch= $stationTask->stationTaskBatch->batch
         //$orders= $batch->....
-        //$json_data=['batch_code','orders']
+        //.....
+        //$json_data=['batch_code','stationCommodities']
         //$this->broadcast($station_id, $json_data)
     }
 

+ 10 - 0
app/StationTypeBinMonitor.php

@@ -0,0 +1,10 @@
+<?php
+
+namespace App;
+
+use Illuminate\Database\Eloquent\Model;
+
+class StationTypeBinMonitor extends Model
+{
+    protected $fillable=['station_id','bin_row_length','bin_column_length','bin_wall_amount'];
+}

+ 12 - 0
database/factories/StationConfigFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationConfig;
+use Faker\Generator as Faker;
+
+$factory->define(StationConfig::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 12 - 0
database/factories/StationTypeBinMonitorFactory.php

@@ -0,0 +1,12 @@
+<?php
+
+/** @var \Illuminate\Database\Eloquent\Factory $factory */
+
+use App\StationTypeBinMonitor;
+use Faker\Generator as Faker;
+
+$factory->define(StationTypeBinMonitor::class, function (Faker $faker) {
+    return [
+        //
+    ];
+});

+ 5 - 4
database/migrations/2020_12_07_143049_station_task_children.php → database/migrations/2020_12_07_144724_add_column_bin_numbers_to_task_commodities.php

@@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
 use Illuminate\Database\Schema\Blueprint;
 use Illuminate\Support\Facades\Schema;
 
-class StationTaskChildren extends Migration
+class AddColumnBinNumbersToTaskCommodities extends Migration
 {
     /**
      * Run the migrations.
@@ -13,8 +13,8 @@ class StationTaskChildren extends Migration
      */
     public function up()
     {
-        Schema::table('name', function (Blueprint $table) {
-            //
+        Schema::table('station_task_commodities', function (Blueprint $table) {
+            $table->integer('bin_number')->after('handled_amount');
         });
     }
 
@@ -25,7 +25,8 @@ class StationTaskChildren extends Migration
      */
     public function down()
     {
-        Schema::table('name', function (Blueprint $table) {
+        Schema::table('station_task_commodities', function (Blueprint $table) {
+            $table->dropColumn('bin_number');
             //
         });
     }

+ 35 - 0
database/migrations/2020_12_07_150608_create_station_type_bin_monitors_table.php

@@ -0,0 +1,35 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Database\Schema\Blueprint;
+use Illuminate\Support\Facades\Schema;
+
+class CreateStationTypeBinMonitorsTable extends Migration
+{
+    /**
+     * Run the migrations.
+     *
+     * @return void
+     */
+    public function up()
+    {
+        Schema::create('station_type_bin_monitors', function (Blueprint $table) {
+            $table->id();
+            $table->integer('station_id')->index();
+            $table->integer('bin_row_length')->default(4);
+            $table->integer('bin_column_length')->default(5);
+            $table->integer('bin_wall_amount')->default(2);
+            $table->timestamps();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     *
+     * @return void
+     */
+    public function down()
+    {
+        Schema::dropIfExists('station_type_bin_monitors');
+    }
+}

+ 16 - 0
database/seeds/StationConfigSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationConfigSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 16 - 0
database/seeds/StationTypeBinMonitorSeeder.php

@@ -0,0 +1,16 @@
+<?php
+
+use Illuminate\Database\Seeder;
+
+class StationTypeBinMonitorSeeder extends Seeder
+{
+    /**
+     * Run the database seeds.
+     *
+     * @return void
+     */
+    public function run()
+    {
+        //
+    }
+}

+ 46 - 22
resources/views/station/monitor/show.blade.php

@@ -19,10 +19,10 @@
                     <div class="col text-center  h3 py-2 text-muted">智能分拣</div>
                 </div>
                 <div class="row pt-3">
-                    <div class="col-4 text-center">
+                    <div class="col-4">
                         <div class="row">
                             <div class="col py-3 h4">
-                                波次号:
+                                波次号:nnnnnnnnnnn
                             </div>
                             <div class="col py-3 h4">
 
@@ -37,17 +37,7 @@
                         </div>
                         <div class="row">
                             <div class="col py-3 h4">
-                                料箱号:
-                            </div>
-                            <div class="col py-3 h4">
-
-                            </div>
-                        </div>
-                        <div class="row">
-                            <div class="col py-3 h4">
-                            </div>
-                            <div class="col py-3 h4 text-muted">
-                                {条码}
+                                料箱号:nnnnnnnnnnn
                             </div>
                         </div>
                         <div class="row pt-5">
@@ -56,8 +46,42 @@
                     </div>
                     <div class="col text-center">
                         <div class="row">
-                            <div class="col py-3 h4">订单号:</div>
-                            <div class="col py-3 h4">N</div>
+                            <div class="col py-3 h4">
+                                <table class="table border">
+                                    <tr>
+                                        <td class="border p-0"><span style="opacity:0.25">6</span></td>
+                                        <td class="bg-info border p-0"><span style="opacity:0.25">7</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">8</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">9</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">10</span></td>
+                                    </tr>
+                                    <tr>
+                                        <td class="border p-0"><span style="opacity:0.25">1</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">2</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">3</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">4</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">5</span></td>
+                                    </tr>
+                                </table>
+                            </div>
+                            <div class="col py-3 h4">
+                                <table class="table border">
+                                    <tr>
+                                        <td class="border p-0"><span style="opacity:0.25">6</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">7</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">8</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">9</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">10</span></td>
+                                    </tr>
+                                    <tr>
+                                        <td class="border p-0"><span style="opacity:0.25">1</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">2</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">3</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">4</span></td>
+                                        <td class="border p-0"><span style="opacity:0.25">5</span></td>
+                                    </tr>
+                                </table>
+                            </div>
                         </div>
                         <div class="row">
                             <div class="col py-1">数量</div>
@@ -68,28 +92,28 @@
                         <div class="row">
                             <div class="col py-1">
                                 <table class="table table-striped border">
-                                    <tr>
+                                    <tr class="text-muted">
                                         <th class="py-2">序号</th>
                                         <th class="py-2">商品</th>
                                         <th class="py-2">数量</th>
                                         <th class="py-2">条码</th>
                                     </tr>
-                                    <tr>
-                                        <td></td>
+                                    <tr class="text-muted">
                                         <td></td>
                                         <td></td>
+                                        <td>0/0</td>
                                         <td></td>
                                     </tr>
-                                    <tr>
-                                        <td></td>
+                                    <tr class="text-muted">
                                         <td></td>
                                         <td></td>
+                                        <td>0/0</td>
                                         <td></td>
                                     </tr>
-                                    <tr>
-                                        <td></td>
+                                    <tr class="text-muted">
                                         <td></td>
                                         <td></td>
+                                        <td>0/0</td>
                                         <td></td>
                                     </tr>
                                 </table>