瀏覽代碼

称重包裹表样式调整,事件命名调整

LD 6 年之前
父節點
當前提交
8b2b20e814

+ 1 - 1
app/Events/WeightEvent.php → app/Events/WeighedEvent.php

@@ -8,7 +8,7 @@ use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
 use Illuminate\Queue\SerializesModels;
 use Illuminate\Broadcasting\PrivateChannel;
 
-class WeightEvent implements ShouldBroadcast
+class WeighedEvent implements ShouldBroadcast
 {
     use  SerializesModels;
 

+ 1 - 1
app/Http/Controllers/MeasureMonitorController.php

@@ -2,7 +2,7 @@
 
 namespace App\Http\Controllers;
 
-use App\Events\WeightEvent;
+use App\Events\WeighedEvent;
 use App\MeasuringMachine;
 use App\Package;
 use Illuminate\Http\Request;

+ 2 - 2
app/Http/Controllers/PackageController.php

@@ -2,7 +2,7 @@
 
 namespace App\Http\Controllers;
 
-use App\Events\WeightEvent;
+use App\Events\WeighedEvent;
 use App\Exports\WaybillExport;
 use App\Owner;
 use App\Package;
@@ -84,7 +84,7 @@ class PackageController extends Controller
             'paper_box_id'=>$paper_box_id
         ]);
         $package->save();
-        event(new WeightEvent($package));
+        event(new WeighedEvent($package));
         return redirect('package/create')->with('successTip','新记录“'.$logistic_number.'”录入成功');
     }
 

+ 2 - 2
app/Http/Controllers/api/thirdPart/weight/PackageController.php

@@ -2,7 +2,7 @@
 
 namespace App\Http\Controllers\Api\thirdPart\weight;
 
-use App\Events\WeightEvent;
+use App\Events\WeighedEvent;
 use App\Http\Controllers\Controller;
 use App\Http\Controllers\LogisticNumberFeatureController;
 use App\Jobs\MeasuringMachineQueue;
@@ -117,7 +117,7 @@ class PackageController extends Controller
                 }
                 $package->save();
             }
-            event(new WeightEvent($package));
+            event(new WeighedEvent($package));
             $response=["msg"=>"保存成功",
                         "code"=>200,
                         "data"=>true,

+ 2 - 2
app/Jobs/MeasuringMachineQueue.php

@@ -2,7 +2,7 @@
 
 namespace App\Jobs;
 
-use App\Events\WeightEvent;
+use App\Events\WeighedEvent;
 use App\MeasuringMachine;
 use App\Package;
 use Carbon\Carbon;
@@ -45,7 +45,7 @@ class MeasuringMachineQueue implements ShouldQueue
                 $package=new Package();
                 if ($this->measuringMachine)$package->measuringMachine=$this->measuringMachine;
             }
-            event(new WeightEvent($package));
+            event(new WeighedEvent($package));
         }
     }
 

+ 1 - 1
app/MeasuringMachine.php

@@ -2,7 +2,7 @@
 
 namespace App;
 
-use App\Events\WeightEvent;
+use App\Events\WeighedEvent;
 use Illuminate\Database\Eloquent\Model;
 
 class MeasuringMachine extends Model

+ 10 - 12
resources/views/weight/package/index.blade.php

@@ -78,7 +78,7 @@
                                 <td colspan="9">
                                     <select @change="packageExport" :class="[checkData>0?'btn-dark':'btn-outline-dark']"  class=" tooltipTarget form-control-sm" style=" vertical-align: middle"
                                              title="导出所有页将会以搜索条件得到的过滤结果,将其全部记录(每一页)导出">
-                                        <option >选择导出规则</option>
+                                        <option >选择Excel</option>
                                         <option value="1">导出勾选内容</option>
                                         <option value="2">导出所有页</option>
                                     </select>
@@ -100,12 +100,7 @@
                         <th>ID</th>
                         <th>货主</th>
                         <th>快递单号</th>
-                        <th>发货单号</th>
                         <th>波次号</th>
-                        <th>波次规则</th>
-                        <th>操作时间</th>
-                        <th>收件人</th>
-                        <th>收件人电话</th>
                         <th>物流公司</th>
                         <th>设备</th>
                         <th>重(KG)</th>
@@ -113,6 +108,10 @@
                         <th>体积(cm³)</th>
                         <th>纸箱</th>
                         <th>状态</th>
+                        <th>波次规则</th>
+                        <th>创建时间</th>
+                        <th>收件人</th>
+                        <th>收件人电话</th>
                     </tr>
                     <tr v-for="(package,i) in packages">
                         <td>
@@ -122,19 +121,18 @@
                         <td class="text-muted">@{{package.id}}</td>
                         <td>@{{package.ownerName}}</td>
                         <td>@{{package.logisticNumber}}</td>
-                        <td class="text-muted">@{{package.wmsNumber}}</td>
                         <td class="text-muted">@{{package.batchNumber}}</td>
-                        <td>@{{package.batchRule}}</td>
-                        <td class="text-muted">@{{package.created_at}}</td>
-                        <td>@{{package.recipient}}</td>
-                        <td>@{{package.recipientMobile}}</td>
                         <td class="text-muted">@{{package.logisticName}}</td>
                         <td class="text-muted">@{{package.measuringMachineName}}</td>
                         <td>@{{package.weight}}</td>
                         <td>@{{package.length}}<a v-if="package.length" class="text-primary">*</a>@{{package.width}}<a class="text-primary" v-if="package.width">*</a>@{{package.height}}</td>
                         <td>@{{package.bulk}}</td>
                         <td>@{{package.paperBoxName}}</td>
-                        <td>@{{package.status}}</td>
+                        <td :class="[package.status==='已上传'?'text-success':'']">@{{package.status}}</td>
+                        <td class="text-muted">@{{package.batchRule}}</td>
+                        <td class="text-muted">@{{package.created_at}}</td>
+                        <td class="text-muted">@{{package.recipient}}</td>
+                        <td class="text-muted">@{{package.recipientMobile}}</td>
                     </tr>
                 </table>
                 {{$packages->links()}}